On 4/18/2012 09:38, MARTIN Pierre wrote: > Dear JonY, dear list readers, > >> Try using gendef -a, also, try using regular non-delay lib as a test. > if i compile my library and then generate the .a with a def from gendef with > the > --assume-stdcall option, then i'm unable to link against my library. > i get a lot of messages like this (When i compile a binary using my library): > ./debug\SCTypes.o: In function `ZN2SC17StaticInitializerEv': > C:\Home\Administrator\Documents\PQRRS\Debug\SCLibrary/../../PQRRS/SCLibrary/src/SCTypes.cpp:136: > > undefined reference to `_imp___ZN2RE17StaticInitializerEv' > ./debug\AScannerController.o: In function > `ZN2SC18AScannerController9configureERKNS_6ConfigE': > C:\Home\Administrator\Documents\PQRRS\Debug\SCLibrary/../../PQRRS/SCLibrary/src/Controllers/AScannerController.cpp:120: > > undefined reference to `_imp___ZN2RE6Engine20loadClientBinaryDataERK7QString' > ./debug\AScannerController.o: In function > `ZN2SC18AScannerController17recognitionEngineEv': > C:\Home\Administrator\Documents\PQRRS\Debug\SCLibrary/../../PQRRS/SCLibrary/src/Controllers/AScannerController.cpp:200: > > undefined reference to `_imp___ZN2RE6EngineC1EP7QObject' > ./debug\AScannerController.o: In function > `ZN2SC18AScannerController16createREDocumentEj': > C:\Home\Administrator\Documents\PQRRS\Debug\SCLibrary/../../PQRRS/SCLibrary/src/Controllers/AScannerController.cpp:257: > > undefined reference to `_imp___ZN2RE1T8DocumentC1Ej' > C:\Home\Administrator\Documents\PQRRS\Debug\SCLibrary/../../PQRRS/SCLibrary/src/Controllers/AScannerController.cpp:258: > > undefined reference to `_imp___ZN2RE1T8Document6retainEv' > And so on... The .def generated with the --assume-stdcall option is attached > (RELibrary_withAstdcOpt.def). > > When i don't use the --assume-stdcall option on my library, then i am able to > later link against the generated .a, and the binaries run fine (But i have > attached the .def too so you can see the differences, see > RELibrary_withoutAstdcOpt.def). > > The problem arises when using the --output-delaylib (See > RELibrary_withAstdcOpt.delayed.def / RELibrary_withoutAstdcOpt.delayed.def). > When the binary is calling the first function (Which is > RE::StaticInitializer) > within the library, it crashes with SIGSEV segfault (But i'm not sure how to > pinpoint the "why"). > > About the linker command line, which one do you want exactly? The one when > linking against my library or when compiling it? With what options > (--assume-stdcall on the .def or not? Delayed or not?)? >
OK, so linking and running works if done without delay loading? If so, it might be a bug in the delay loading code. For the linker command, show both.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
