On 4/18/2012 20:37, MARTIN Pierre wrote: > Dear JonY and dear users, > > i have found another weird clue to my problem. > > i just have tried to compile another program of our project that uses the > same library we are talking about. > When linking against the libRELibrary.a, everything is swell. But when > linking against the delay-loaded version, the linker reports errors (See at > the end of this email). > i'm asking myself... Isn't a delay-loaded import library supposed to export > the exact same function the DLL does, but just load the real library when one > of those function is called? If yes, then i may be doing something wrong when > using the gendef / dlltool, it clearly is changing what gets exported in the > delayed.a ... > > So maybe i shouldn't do it as an "extra" step, and maybe there is a flag in > the linker to tell it to directly create both the regular and delay-loaded > version of the import lib (And if that flag involves doing something > different than internally calling gendef / dlltool of course)? > > The weird thing is that my Qt .pro file (It is like a Makefile generator, if > you don't know about Qt) is targeted to be cross-platform, and the directive > i made works on Mac, the delay-loading is perfectly working. > > Also, i tend to agree with what Kai said: I wouldn't assume there is a bug in > the delayload code, it would be very unlikelly coincidence as i'm really new > to this mingw-w64 project, so it *has* to be something i do wrong. How can i > know my mistake for sure? > > Thanks guys! > Pierre. > > > g++ -mthreads -Wl,-subsystem,windows -o ..\..\PQRRS\Debug\RELibraryAdmin.exe > object_script.RELibraryAdmin.Debug > -L"c:\QtSdk\Desktop\Qt\4.8.1\mingw-w64\lib" -lmingw32 -lqtmaind > -LC:/Home/Administrator/Documents/PQRRS/PQRRS/Debug -lRELibrary.delayed > -lQtScriptd4 -lQtSqld4 -lQtGuid4 -lQtCored4 > mingw32-make.exe[1]: Leaving directory > `C:/Home/Administrator/Documents/PQRRS/Debug/RELibraryAdmin' > ./debug\Core.o: In function > `ZN3REA4Core11openProjectERK7QStringRK11QStringList': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/Core.cpp:183: > undefined reference to `_imp___ZNK2RE6Engine13loadedPluginsEv' > ./debug\AnnRunner.o: In function `ZN3REA9AnnRunner11runTrainingEv': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/Workers/AnnRunner.cpp:132: > undefined reference to `_imp___ZN2RE6Engine11annToBinaryEPK4fann' > ./debug\SampleImagesSigner.o: In function `ZN3REA18SampleImagesSigner3runEv': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/Workers/SampleImagesSigner.cpp:39: > undefined reference to `_imp___ZNK2RE6Engine17signatureForImageERK6QImage' > ./debug\ZoneRecognizersModel.o: In function > `ZNK3REA20ZoneRecognizersModel4dataERK11QModelIndexi': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/Models/ZoneRecognizersModel.cpp:153: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtZoneRecognizersManager.o: In function `WgtZoneRecognizersManager': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/WgtZoneRecognizersManager.cpp:68: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/WgtZoneRecognizersManager.cpp:77: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtZoneRecognizersManager.o: In function > `ZN3REA25WgtZoneRecognizersManager26zoneCreationMenu_triggeredEP7QAction': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/WgtZoneRecognizersManager.cpp:195: > undefined reference to > `_imp___ZNK2RE6Engine22makeZoneRecognizerDataERK7QString6QRectF' > ./debug\WgtZoneRecognizersManager.o: In function > `ZN3REA25WgtZoneRecognizersManager28filterCreationMenu_triggeredEP7QAction': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/WgtZoneRecognizersManager.cpp:270: > undefined reference to `_imp___ZNK2RE6Engine18makeZoneFilterDataERK7QString' > ./debug\WgtZoneRecognizersManager.o: In function > `ZN3REA25WgtZoneRecognizersManager31on_btnRefreshRecognizer_clickedEv': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/WgtZoneRecognizersManager.cpp:290: > undefined reference to > `_imp___ZNK2RE6Engine23filteredRecognizerImageERKNS_1T18ZoneRecognizerDataERK6QImage' > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/WgtZoneRecognizersManager.cpp:292: > undefined reference to > `_imp___ZNK2RE6Engine17recognizerResultsERKNS_1T18ZoneRecognizerDataERK6QImage' > ./debug\WndMain.o: In function `DlgAbout': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI//DlgAbout.h:30: > undefined reference to `_imp___ZNK2RE6Engine13loadedPluginsEv' > ./debug\ZoneRecognizersScene.o: In function > `ZN3REA20ZoneRecognizersScene16updateRecognizerEPNS_18ZoneRecognizerItemE': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/ZoneRecognizersScene/ZoneRecognizersScene.cpp:80: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtCVMListEditor.o: In function `WgtCVMListEditor': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/EditorsAndDelegates/WgtCVMListEditor.cpp:22: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtCVMListEditor.o: In function > `ZN3REA16WgtCVMListEditor8setValueERK5QListIN2RE1T8CVMatrixEE': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/EditorsAndDelegates/WgtCVMListEditor.cpp:43: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtCVMListEditor.o: In function > `ZN3REA16WgtCVMListEditor17addMenu_triggeredEP7QAction': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/EditorsAndDelegates/WgtCVMListEditor.cpp:55: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtEnumItemEditor.o: In function `WgtEnumItemEditor': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/EditorsAndDelegates/WgtEnumItemEditor.cpp:23: > undefined reference to > `_imp___ZN2RE24VariantForEnumMetatypeIdEN8QVariant4TypeEi' > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/EditorsAndDelegates/WgtEnumItemEditor.cpp:23: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\WgtParametersListEditor.o: In function > `ZN3REA23WgtParametersListEditor13setParametersERK4QMapI7QString8QVariantE': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/EditorsAndDelegates/WgtParametersListEditor.cpp:77: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\ClientBinaryGenerator.o: In function > `ZN3REA21ClientBinaryGenerator16IntroductionPage15btnPath_clickedEv': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/Wizards/ClientBinaryGenerator.cpp:100: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > ./debug\ClientBinaryGenerator.o: In function > `ZN3REA21ClientBinaryGenerator16AnnSelectionPage24dtModel_selectionChangedERK14QItemSelectionS4_': > C:\Home\Administrator\Documents\PQRRS\Debug\RELibraryAdmin/../../PQRRS/RELibraryAdmin/src/UI/Wizards/ClientBinaryGenerator.cpp:220: > undefined reference to `_imp___ZN2RE24ClassNameToNaturalStringERK7QString' > collect2: ld returned 1 exit status > mingw32-make.exe[1]: *** [..\..\PQRRS\Debug\RELibraryAdmin.exe] Error 1 > mingw32-make.exe: *** [debug] Error 2 > 14:28:13: The process "C:\MinGW\mingw-w64\bin\mingw32-make.exe" exited with > code 2. > Error while building project Recognition Suite (target: Desktop) > When executing build step 'Make' >
I checked it against your def file, looks like it's __ZNK2RE6Engine13loadedPluginsEv@4, not __ZNK2RE6Engine13loadedPluginsEv, I'm not sure how non-delay lib is linking successfully. Did you use the proper call declaration?
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
