I also assumed that the definitions would be found easily but my assumption was wrong.
The externs are obviously referenced internally in libcommon.a and must be defined by the application that uses libcommon.a - and that's what makes this less straightforward.
The project I'm working on is to resolve a series of segmentation faults that I was getting when attempting to execute these applications on FreeBSD using the project's original build system. I created a very small test application - all it does is link against libcommon.a and then exist - to see if any application linked with libcommon.a could run without instantly crashing.
I first saw these 4 linker errors when I created my test application. I assumed that the other applications such as shared_memory, world, and zone would define these variables. However, the shared_memory code base defines none of these variables.
How does shared_memory ever get linked if the application files never define these externs?
|