Re: problem compiling on Mac OS X
suppaman <[email protected]> Tue, 19 Apr 2005 23:09:50 +0200
| Newsgroups | gmane.comp.lang.lua.luacheia |
|---|---|
| Message-ID | <[email protected]> |
Il giorno 19/apr/05, alle 22:33, Asko Kauppi ha scritto: > > Well, I don't know "why".. > > To disable default libraries (momentarily, for testing) I've done > "sudo mv /sw /sw_" (fink root), which is ugly and severe, but works. > :) You could do similar with "/usr/local/" or similar. > > This one is really on you, I'm just trying to help.. This is the way it is meant to be done: use a -Wl,-search_path_first option within the gcc line, the *_LIBRARY_PATH ain't work as dyld is executed at runtime while here we're speaking about compiling so ld is in play, not dyld. ld scans the whole library search path twice, first time searching for a .dylib then again from start for a .a that suits the -l option given UNLESS you specify the -search_path_first that make it scan the library search path ONCE, searching in every dir the .dylib at first and then a .a and only after that going to the following dir- So in order to compile on mac with a lualib.dylib in /usr/local/lib you need to tell to gcc to use -Wl,-search_path_first, I manually added this to the Makefile, CFLAGS row. > ps. did you try "make clean" first? No. ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728