Author Topic: The procedure entry point _Z13qFlagLocationPKc could not be located  (Read 7083 times)

Offline panoss

  • Single posting newcomer
  • *
  • Posts: 4
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.

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?)



« Last Edit: January 30, 2017, 02:09:18 pm by panoss »
Windows 7 - CodeBlocks 16.01
Windows XP - CodeBlocks 16.01

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #1 on: January 30, 2017, 02:23:26 pm »
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.

Offline panoss

  • Single posting newcomer
  • *
  • Posts: 4
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #2 on: January 30, 2017, 04:41:31 pm »
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..

...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!!
« Last Edit: January 30, 2017, 04:43:55 pm by panoss »
Windows 7 - CodeBlocks 16.01
Windows XP - CodeBlocks 16.01

Offline panoss

  • Single posting newcomer
  • *
  • Posts: 4
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #3 on: January 30, 2017, 08:02:41 pm »
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.
« Last Edit: January 30, 2017, 08:11:10 pm by panoss »
Windows 7 - CodeBlocks 16.01
Windows XP - CodeBlocks 16.01

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #4 on: January 30, 2017, 08:20:48 pm »
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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #5 on: January 30, 2017, 08:22:55 pm »
Does the error appears also if you run your program from within codeblocks?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #6 on: January 30, 2017, 10:02:38 pm »
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

Also, verify that the CB did NOT autodetect an different compiler and change the path to it..

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline panoss

  • Single posting newcomer
  • *
  • Posts: 4
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #7 on: January 31, 2017, 08:21:25 am »
make a fresh rebuild and post the build log here

Code
I am running Code::Blocks version Code: 16.01 on Windows XP (version 5.1). 
The compiler I use is mingw32 version mingw482-4.8.6-1.

When I make a new Qt project and run it, the above mentioned error message appears.
Steps to reproduce problem:
1. in CodeBlocks: File->New Project->Qt4 Project ->Next.
2. Give Project Title->Next.
3. Qt's Location (I give 'C:\Qt\4.8.6')->Next
4. Compiler: GNU/Gcc compiler ->Finish
5. Build->Build and run
6. Appears a message box with the error: "The procedure entry point _Z13qFlagLocationPKc could not be located" etc.

Description of problem: happens anyway I run it: from within CodeBlocks, from the command line and double clicking it.


Build log:
[code]
-------------- Build: Debug in Repairdevices (compiler: GNU GCC Compiler)---------------

i686-w64-mingw32-g++.exe -Wall -g -IC:\Qt\4.8.6\include -IC:\Qt\4.8.6\include\QtGui -c "F:\Documents and Settings\Administrator\My Documents\CodeBlocksProjects\Repairdevices\main.cpp" -o obj\Debug\main.o
i686-w64-mingw32-g++.exe -LC:\Qt\4.8.6\lib -o bin\Debug\Repairdevices.exe obj\Debug\main.o   -lQtCore4 -lQtGui4
Output file is bin\Debug\Repairdevices.exe with size 154.57 KB
Process terminated with status 0 (0 minute(s), 2 second(s))
0 error(s), 0 warning(s) (0 minute(s), 2 second(s))
Build log saved as:
file://F:/Documents%20and%20Settings/Administrator/My%20Documents/CodeBlocksProjects/Repairdevices/Repairdevices_build_log.html
 

-------------- Run: Debug in Repairdevices (compiler: GNU GCC Compiler)---------------

Checking for existence: F:\Documents and Settings\Administrator\My Documents\CodeBlocksProjects\Repairdevices\bin\Debug\Repairdevices.exe
Executing: "F:\Program Files\CodeBlocks/cb_console_runner.exe" "F:\Documents and Settings\Administrator\My Documents\CodeBlocksProjects\Repairdevices\bin\Debug\Repairdevices.exe"  (in F:\Documents and Settings\Administrator\My Documents\CodeBlocksProjects\Repairdevices\.)
Process terminated with status -1073741510 (0 minute(s), 5 second(s))

Crash report:
Code
CodeBlocks disn't crash, so no RPT was found. 

   
I have already tried reinstalling of Qt 4.8.6 but did not work.


Does the error appears also if you run your program from within codeblocks?
It appears in every case: when I run it from within CodeBlocks, when I run it from the command line, and when I run it by double clicking it.


Also, verify that the CB did NOT autodetect an different compiler and change the path to it..
I looked at Settings->Compiler->Toolchain Executables.
Everything seems as I had set it.
« Last Edit: January 31, 2017, 08:56:40 am by panoss »
Windows 7 - CodeBlocks 16.01
Windows XP - CodeBlocks 16.01

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: The procedure entry point _Z13qFlagLocationPKc could not be located
« Reply #8 on: January 31, 2017, 03:42:43 pm »
DO a REBUILD and post the build log or be ignored!

EDIT: REBUILD means use rebuild or do a clean followed by a build. It does NOT mean do a build and run!

Tim S.
« Last Edit: January 31, 2017, 04:07:17 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org