Results 1 to 2 of 2
  1. #1

    Member Since
    Oct 31, 2009
    32 bits on Snow Leopard : old dylib, dylib paths and xcode
    Hello !
    I've got a problem with 32 bits on Snow Leopard. I'm unable to change paths inside an old leopard dylib, and i have architecture compilation problems when i compile the dylib and the project that uses it. (i've replaced personal information in the rest of the post)

    I want to use libsigc++ (a signal library) in a project but :

    - if i use my old leopard compiled dylib of libsigc++, an absolute path is wrong inside the dylib, when i run the application that uses the dylib, i get
    Dyld Error Message: Library not loaded:
    and the indicated path is wrong (as i see when i do otool -L dylib_file)
    but if i do install_name_tool with the change flag
    the path remain the same when i do otool -L dylib_file
    in addition, if i do install_name_tool with the delete_rpath flag
    i get install_name_tool: no LC_RPATH load command with path: ...

    - if i try to compile libsigc++ on Snow Leopard, everything seems to work, and when i compile the project that uses the compiled libsigc++, i get :
    ld: warning: in DYLIB_FILE, file is not of required architecture

    I've tried, as i seen on a forum, to compile my dylib with
    env CFLAGS=-arch i386 ./configure (with quotes, but it doesn't work here)
    env CFLAGS=-arch i386 make (with quotes too)
    but the result is the same...

    My configuration in XCode is Mac OS 10.5 , i386 , gcc 4.0

    So, does anybody have a solution to change my dylib paths or to be sure that my project and my dylib (compiled with configure and make) are really 32 bits ?

    Thank u !


  2. #2

    Member Since
    Oct 31, 2009
    So finally
    There are no problems with xcode in 64 bits, nor framework 10.6 nor gcc 4.2

    The only problem was the compiling of my library in 32 bits,
    the command i finally used is
    ./configure CFLAGS='-arch i686' LDFLAGS='-arch i686' CC='gcc -m32' CXX='g++ -m32' CHOST='i686-apple-darwin10.0.0' --target= i686-apple-darwin10.0.0 --build= i686-apple-darwin10.0.0 --host= i686-apple-darwin10.0.0
    make CFLAGS='-arch i686' LDFLAGS='-arch i686' CC='gcc -m32' CXX='g++ -m32'

    and it works well ! with my old xcode project coming from leopard, and just a thing to force in xcode : explicitely specify the i386 architecture

    (all this works also with i686 architecture, the other 32 bits)


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. libclang.dylib causing Xcode to crash
    By ScottJW in forum iOS and Apps
    Replies: 1
    Last Post: 09-22-2014, 03:28 AM
  2. Can't delete Gimp -> libexpat.1.5.2.dylib in use?
    By Profashional101 in forum OS X - Apps and Games
    Replies: 3
    Last Post: 07-31-2009, 05:33 AM
  3. Xcode and dylib problem
    By ponggr in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 02-19-2009, 06:05 PM
  4. iMovie lib3ivxEnc.dylib error
    By aurora_schmid in forum Movies and Video
    Replies: 4
    Last Post: 05-27-2008, 12:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts