32 bits on Snow Leopard : old dylib, dylib paths and xcode

Joined
Oct 31, 2009
Messages
2
Reaction score
0
Points
1
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 !

Emilien
 
OP
M
Joined
Oct 31, 2009
Messages
2
Reaction score
0
Points
1
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
{code}
./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
{code}
{code}
make CFLAGS='-arch i686' LDFLAGS='-arch i686' CC='gcc -m32' CXX='g++ -m32'
{code}

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)

Emilien
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top