View Full Version : import library linking
bruce1007
18th May 2006, 07:55
Hi all, my app uses a third party dll library under win32 with QT 4.1.2 framework, and I "reimp"ed the import lib to a ".a" library file, but linking problem is occured when i finally built the project.
Need your help.
thanks
mcosta
18th May 2006, 08:07
Hi all, my app uses a third party dll library under win32 with QT 4.1.2 framework, and I "reimp"ed the import lib to a ".a" library file, but linking problem is occured when i finally built the project.
Need your help.
thanks
In your project file (.pro) add this line
LIBS += -L<PATH_WHERE_LIB_IS> -l<libname>
Bye
bruce1007
18th May 2006, 08:50
I have used "LIBS += ..." reference, but the linker reported "undefined reference" error back.
mcosta
18th May 2006, 09:59
I have used "LIBS += ..." reference, but the linker reported "undefined reference" error back.
Can you post the linker output?
bruce1007
19th May 2006, 03:21
the linker output like below
debug\form.o(.text+0x1c0): In function `ZN4FormC2EP7QWidget':
D:/project/study/prac/form.cpp:13: undefined reference to `stopMovie(void*
debug\form.o(.text+0x2d4): In function `ZN4FormC1EP7QWidget':
D:/project/study/prac/form.cpp:13: undefined reference to `stopMovie(void*
collect2: ld returned 1 exit status
jacek
19th May 2006, 09:52
How does the LIBS line look exactly? Is that a C++ library?
mcosta
19th May 2006, 10:27
How does the LIBS line look exactly? Is that a C++ library?
If isn't a C++ library, use this syntax
extern "C"
{
#include <libinclude>
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.