New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

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


Post Reply New Thread Subscribe

 
Thread Tools
milou645

 
Member Since: Oct 31, 2009
Posts: 2
milou645 is on a distinguished road

milou645 is offline
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
QUOTE Thanks
milou645

 
Member Since: Oct 31, 2009
Posts: 2
milou645 is on a distinguished road

milou645 is offline
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
QUOTE Thanks

Post Reply New Thread Subscribe


« GV on Snow Leopard | Carbon window stays in background »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 07:13 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?