bug-report > RE: Trouble compiling
Jan 3, 2011  10:01 PM | Joseph Mandeville
RE: Trouble compiling
Hi Mark,

I couldn't understand this problem until I upgraded my Mac to 10.6.5 ("Snow Leopard"). It seems that Apple has broken gcc (at least, it no longer works as it does on other systems). The issue seems to be that 10.6.5 no longer supports static linking of libraries. In other words, if you have an object file (mine.o) and a static library sitting in the same directory (libMYLIB.a), then

gcc -o my_executable mine.o -L. -lMYLIB

no longer works. So, the makefiles I provided for Darwin worked fine prior to 10.6.5. A work-around is to treat the static libraries as simple object code:

gcc -o my_executable mine.o libMYLIB.a

This is the strategy I will use for Darwin makefiles on the coming release (v2.0). I will post the new version ASAP.


Threaded View

Mark Pinsk Jul 15, 2010
RE: Trouble compiling
Joseph Mandeville Jan 3, 2011