I'm trying to build the capsimage library as a shared library for MorphOS: http://forum.kryoflux.com/viewtopic.php?p=7624#p7624
After some minor fixes, I was able to compile everything using gcc 2.95.3 from the MorphOS SDK. But I have a problem at the link stage:
/gg/ppc-morphos/bin/ld: CAPSImg/CapsAPI.o: The target (__default_alloc_template<false, 0>::_S_free_list) of a R_PPC_MORPHOS_DREL_HA relocation is in the wrong section (.gnu.linkonce.d._t24__default_alloc_template2b0i0._S_free_list) /gg/ppc-morphos/bin/ld: CAPSImg/CapsAPI.o: The target (__default_alloc_template<false, 0>::_S_free_list) of a R_PPC_MORPHOS_DREL_LO relocation is in the wrong section (.gnu.linkonce.d._t24__default_alloc_template2b0i0._S_free_list) /gg/ppc-morphos/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make: *** [capsimage.library.elf] Error 1
What did I do wrong?
I created my library structure from the skeleton examples of the SDK.
@CISC: I did some tries with your remark in mind but with no result unfortunatly.
The API exposed by the library is C based but most of its internals are C++. Could my problem be related to the C++ templates they are using in the code? Of course it also requires libnix; that's the reason why I started with the nixskeleton example from the SDK; this part seems ok.
No clue at this stage.
Edit: I replaced the code relying on vectors by basic arrays and now it linked properly. Maybe I miss something to be able to use vectors?