eric970119
18th June 2010, 06:37
Hello~ all...
I'm new with QT and program in windows
Recently I download an openSource *.lib from http://code.google.com/p/asmlibrary/downloads/list
The fileis "asmlibrary-5.0.tar.gz " ...
After extracting it and run the project in MSVC 2008, it works fine...
Now I try to create GUI with QT and link to MSVC library ...
the compile error is shown as below...
-------------------------------------------------------------------------------------------------------------
debug/camGL.o: In function `CamGL':
D:\QT_Project\AR\ASM/camGL.cpp:6: undefined reference to `asmfitting::asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:28: undefined reference to `asmfitting::~asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:6: undefined reference to `asmfitting::asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:28: undefined reference to `asmfitting::~asmfitting()'
debug/camGL.o: In function `~CamGL':
D:\QT_Project\AR\ASM/camGL.cpp:33: undefined reference to `asmfitting::~asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:33: undefined reference to `asmfitting::~asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:33: undefined reference to `asmfitting::~asmfitting()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\CameraGL.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project CameraGL
When executing build step 'Make'
--------------------------------------------------------------------------------------------------------------------------------------
Then I google and find an article "MSVC and MinGW DLLs" :cool:
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
So I followed the steps in QT Command Prompt (without gcc steps...)
1.reimp testdll.lib
2.pexports testdll.dll | sed "s/^_//" > testdll.def
3.dlltool -U -d testdll.def -l libtestdll.a
I wish I can modify the MSVC *.lib to MinGW library ...
But nothing happened....:mad:
I've solved for 2 days...
Does anyone know how to solve this problem...~?
Thanks for your reply ...:D
I'm new with QT and program in windows
Recently I download an openSource *.lib from http://code.google.com/p/asmlibrary/downloads/list
The fileis "asmlibrary-5.0.tar.gz " ...
After extracting it and run the project in MSVC 2008, it works fine...
Now I try to create GUI with QT and link to MSVC library ...
the compile error is shown as below...
-------------------------------------------------------------------------------------------------------------
debug/camGL.o: In function `CamGL':
D:\QT_Project\AR\ASM/camGL.cpp:6: undefined reference to `asmfitting::asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:28: undefined reference to `asmfitting::~asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:6: undefined reference to `asmfitting::asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:28: undefined reference to `asmfitting::~asmfitting()'
debug/camGL.o: In function `~CamGL':
D:\QT_Project\AR\ASM/camGL.cpp:33: undefined reference to `asmfitting::~asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:33: undefined reference to `asmfitting::~asmfitting()'
D:\QT_Project\AR\ASM/camGL.cpp:33: undefined reference to `asmfitting::~asmfitting()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\CameraGL.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project CameraGL
When executing build step 'Make'
--------------------------------------------------------------------------------------------------------------------------------------
Then I google and find an article "MSVC and MinGW DLLs" :cool:
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
So I followed the steps in QT Command Prompt (without gcc steps...)
1.reimp testdll.lib
2.pexports testdll.dll | sed "s/^_//" > testdll.def
3.dlltool -U -d testdll.def -l libtestdll.a
I wish I can modify the MSVC *.lib to MinGW library ...
But nothing happened....:mad:
I've solved for 2 days...
Does anyone know how to solve this problem...~?
Thanks for your reply ...:D