I'm trying to compile a program on MAC OSX, originally written on the Linux OS. It is a big program with several makefiles. I have been working on it for weeks and now cannot seem to figure out why is causing undefined symbols errors. There is one overarching Makefile that calls upon the other makefiles so that the order of compilation is correct.
When you compile, it creates static libraries as well as multiple applications. Because this guys is so huge, the program creates these static libraries (.a files) first. Then when it compiles the source code specifically for the application, it links the static libraries. (hopefully that wasn't too confusing) .
I can get past the building of the static libraries just fine, but once i reach the point when the application is getting built, i receive tons, of undefined symbol errors telling me, for example
Undefined symbols: "_bagUpdateOptSurface", referenced from: _dbv_bag in libdbdbv6.a(dbv_bag.o)
When i check dbv_bag.o with nm, i get a lot of functions that are undefined with the header U .
i can trace back this function with nm and find that ...
bagUpdateOptSurface.c -->bagUpdateOptSurface.o -->libbag.a --->dbv_bag.c --->dbv_bag.o --->libdbdv6.a --->application
the function is defined through the static library libbag.a with the header T, but the object file dbb_bag.o has it as undefined with U. Somewhere in there the information is lost and i cannot seem to understand why.
if someone out there with more experience porting programs to mac can help shed some light on what is going on, i would very much grateful. Any ideas right or wrong, is welcome.
thanks in advance