开发者

Problem with code::blocks;Qt4;MingW;The procedure entry point.. could not be located in the dynamic link library QtCore.dll:

开发者 https://www.devze.com 2023-03-25 17:25 出处:网络
I am running Code::Blocks 10.05 with the MingW compiler package on a Win7-32 box. I downloaded and installed the Qt libs for Windows/MingW (qt-win-opensource-4.7.3-mingw.exe) - installation went smo

I am running Code::Blocks 10.05 with the MingW compiler package on a Win7-32 box.

I downloaded and installed the Qt libs for Windows/MingW (qt-win-opensource-4.7.3-mingw.exe) - installation went smoothly - BUT when it prompted me for the directory for MingW and I pointed it to Code::Blocks installation dir开发者_StackOverflow社区ectory, Qt installer told me my Qt package was for MingW 4.4 and I had 4.4.1 installed - 'installation may not work'. I installed anyhow, figuring there's no significant difference between 4.4 and 4.4.1 and the installation finished without error, all the Qt libs and tools are installed.

Afterwards, in Code::Blocks I created a small test project using the Code::Blocks wizard - here is the code:

#include <QApplication>

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    return app.exec();
}

The code built fine in the IDE - no errors or warnings, but when I ran it, I immediately received this error message, and the app exited with an error code:

"The procedure entry point _ZI3qFlagLocationPKc could not be located in the dynamic link library QtCore.dll"

Anybody know what's going on here? Is it because of the MingW version discrepancy I was warned on, or some other reason? How can I fix this? I want to use Qt Code::blocks, not Nokia QtCreator.

TIA


Add %qtDir%\lib to your path before trying to copy all to system32. Reboot after adding, then all should run fine.

Also, you may need to rebuild qt libs with your compiler if all is still not working...


I used to have that errors, too. And having Qt libs in PATH doesn't seem to help, someone told me to put them into %WINDIR%\system32 and everything works fine after that...


You should create the variables: QTDIR - C:\Qt\4.7.3 (it's mine, you should write yours)

QMAKESPEC - win32-g++ (for MinGW)

PATH - C:\Qt\4.7.3\bin;C:\mingw\bin

0

精彩评论

暂无评论...
验证码 换一张
取 消