I think the problem here is ordering of static libs - I assume the various JSBsim sub-libs, eg 'jsbsim/models/libModels.a', all rely on symbols from the core JSBsim lib, jsbsim/libJSBSim.a. However, libJSBSim.a is listed before them in the link order. GCC has the behaviour, when linking static libraries, of using the static library to resolve all currently un-defined symbols in the current code, and then discarding all remaining symbols from the static lib. If a later library in the link line then needs one of those symbols, it will not be found .
 
So, in summary, the solution is to edit your Makefile so libJSBSim is linked after all the other JSBSim libs, and you may have to further tweak the order to get everything to come out right.
 
I suspected that might be the problem. So, I played with the order last night. It didn't change anything. After reading your note, I reconsidered, went back, and adjusted it some more. The unresolved references changed, but I did not eliminate them. So, I went back and used a sledgehammer: I linked the JSBSim libraries twice. I also had to link the libFlight library twice. That worked, and I now have an executable that can begin to load the new JSBSim files (though I still have some debugging to do).
 
Obviously, this doesn't seem optimal. I'm not sure how I could possibly arrange the files so there is only a single link reference to each library. Yet, I don't know how I should modify the Makefile.am to produce a multiplely-referenced library - or even if that is possible.
 
Jon
 
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to