User forums > Using Code::Blocks
The procedure entry point _Z13qFlagLocationPKc could not be located
panoss:
Hello everybody.
The complete error is: "The procedure entry point _Z13qFlagLockationPKc could not be located in the dynamic link library QtCore.dll".
What I'm trying to do is use CodeBlocks with Qt. (if you 're wondering why I'm not using Qt Creator, it's because I have a 'weak' pc and Qt Creator is quite 'heavy').
I make a new project, I choose 'Qt4 Project', it gets created, in some point I was asked for Qt location and I put it (C:\Qt\4.8.5)
and saved it.
But when I tried to build and run it, the above mentioned error appeared!
How can I fix it?
According to this:
--- Quote ---Probably you get this error because you use dlls from QtCreator directory which was not compiled with mingw (often QtCreator compiled with Microsoft visual studio on Windows)
You should use dlls from C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin (for example) .
App which was compiled with mingw needs dll which compiled with mingw too.
--- End quote ---
But I haven't found any mingw folder in C:\Qt\4.8.5. (this is the Qt framework)
But I do have MingW installed in C:\MingW
How can I make CodeBlocks use dlls from C:\MingW? (I guess that's what I'm supposed to do, right?)
BlueHazzard:
As you have found out, the compiler of your app and the compiler of the library have to match. So you need an installation of qt with the right compiler. There are two ways to get the correct library:
1) Use this link for qt 4.8.6 http://download.qt.io/archive/qt/4.8/4.8.6/qt-opensource-windows-x86-mingw482-4.8.6-1.exe
!!! Probably you have also to use mingw 4.8.2 i don't know what version you are using right now..
2) Compile qt by yourself with your compiler: https://wiki.qt.io/Building_Qt_Desktop_for_Windows_with_MinGW
Then you have to specify the right library path in the project assistant. I have never done anything with qt, so i hope other people can help you more here...
greetings.
panoss:
I did this:
--- Quote ---1) Use this link for qt 4.8.6 http://download.qt.io/archive/qt/4.8/4.8.6/qt-opensource-windows-x86-mingw482-4.8.6-1.exe
!!! Probably you have also to use mingw 4.8.2 i don't know what version you are using right now..
--- End quote ---
...and also installed this mingw: i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z. This was suggestion of Qt installer!
Then in CodeBlocks' Settings -> Compiler->Toolchain executables -> Program Files, I changed:
C Compiler: i686-w64-mingw32-gcc.exe
C++ Compiler: i686-w64-mingw32-g++.exe
Linker For Dynamic libs: i686-w64-mingw32-g++.exe
And worked!!!
Thank you very much for your help BlueHazzard!!
panoss:
The error appears again... :(
I don't know if this is relevnt, but I mention it: after the successful run in CodeBlocks, I installed in python the package PyQt.
Logically, this is not relevant or connected to Qt Framework or something that has to do with CodeBlocks.
BlueHazzard:
make a fresh rebuild and post the build log here:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
also make sure you have selected the right compiler in your project and in the compiler settings
Navigation
[0] Message Index
[#] Next page
Go to full version