[solved] QT creator 2.4.1 - Errors whens compiling examples
-
I don't know If it's the right place to post on compilation errors. I tried to run some examples in the QT demos and am getting LNK1104.
With Affline Transformations demo, I get:
link \LIBPATH:"..\shared\debug" \LIBPATH:"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\lib" \NOLOGO \DYNAMICBASE \NXCOMPAT \DEBUG \MANIFEST \MANIFESTFILE:"debug\affine.intermediate.manifest" \SUBSYSTEM:WINDOWS "\MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" LINK:-1: erreur : LNK1104: cannot open file 'demo_shared.lib'
and with: Plug & Paint Example, I get:
:-1: erreur : LNK1104: cannot open file 'pnp_basictoolsd.lib'
Did anyone got this problem solved please?
thanks,
Maissiou23 -
There is an error in the provided .pro file. Edit plugandpaint.pro and add the plugins/ directory as a library path so that the line now reads:
LIBS = -L../tools/plugandpaintplugins/basictools -L plugins/ -lpnp_basictools
-
Thank you Blizzard,
actually the Libs line was:
LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictoolsand the actual path to "basictools" folder is:
C:\QtSDK\Examples\4.7\tools\plugandpaintplugins\basictoolsI tried:
LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaintplugins/basictools -L plugins/ -lpnp_basictoolsbut now am getting another error:
main.obj:-1: error: LNK2019: unresolved external symbol "class QObject * __cdecl qt_plugin_instance_pnp_basictools(void)" (?qt_plugin_instance_pnp_basictools@@YAPAVQObject@@XZ) referenced in function "public: __thiscall Staticpnp_basictoolsPluginInstance::Staticpnp_basictoolsPluginInstance(void)" (??0Staticpnp_basictoolsPluginInstance@@QAE@XZ)
debug\plugandpaint.exe:-1: error: LNK1120: 1 unresolved externals
could you point me out further please?
-
This error usually means that you are missing the main() function, or that the compiler is expecting a different main() function. Also, you may be running it as the wrong project type in your IDE (if you are using one). How do you build the example?
-
I get passed the last error suprisingly by removing this line in the shared.pri file:
@#!hpuxi-acc*:!hpux-acc*:!symbian:LIBS += -ldemo_shared@but now am getting:
@:-1: error: undefined reference to `ArthurStyle::ArthurStyle()'@
even with the include: @#include "arthurstyle.h"@
any suggestions?
thanks again.
-
Are arthurstyle.cpp and arthurstyle.h included in your SOURCES and HEADERS sections in your .pro file?
-
I tried to add arthurstyle to the project file and still the same error.
If the example code (Affine Transformations from QT examples) is working for you guys, should I simply reinstall QT as the problem come from the QT example? ... am using the windows version of QT by the way
-
A simple workaround is to copy
QtSDK\Examples\4.7\tools\plugandpaint\plugins\pnp_basictoolsd.lib
to upper directory. (QtSDK\Examples\4.7\tools\plugandpaint)
-
Thank you, the problem have been fixed with the last releases of Qt 5.
-
Could you please prepend a [solved] to the title of this thread? Thank you :-)
-
might be too late to help. I installed qt5 and the run the new affine example.
[quote author="hardcodes.de" date="1367062871"]Could you please prepend a [solved] to the title of this thread? Thank you :-)[/quote]