QtCore and QtOpenGL fatal error
Hi, guys
Could someone rectify this....
I am using CMake to generate Visual Studio Express Edition 2008 solution files......
I have configured CMake to choose Qt version as 4 and also set debug / release library directories,
For instance...
QT_CORE_LIBRARY_DEBUG - E:/Qt/4.4.1/lib/QtCored4.dll
QT_CORE_LIBRARY_RELEASE - E:/Qt/4.4.1/lib/QtCore4.dll
QT_OPENGL_LIBRARY_DEBUG - E:/Qt/4.4.1/lib/QtOpenGLd4.dll
QT_OPENGL_LIBRARY_RELEASE - E:/Qt/4.4.1/lib/QtOpenGL4.dll
and others....
After building the Solution, why does an error such as this appear
1>Linking...
1>E:\Qt\4.4.1\lib\QtCored4.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x308
3>Linking...
3>LINK : warning LNK4044: unrecognized option '/lopengl32'; ignored
3>LINK : warning LNK4044: unrecognized option '/lglu32'; ignored
3>LINK : warning LNK4044: unrecognized option '/lgdi32'; ignored
3>LINK : warning LNK4044: unrecognized option '/luser32'; ignored
3>E:\Qt\4.4.1\lib\QtOpenGLd4.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x308
Re: QtCore and QtOpenGL fatal error
Re: QtCore and QtOpenGL fatal error
Try changing
QT_CORE_LIBRARY_DEBUG - E:/Qt/4.4.1/lib/QtCored4.dll
QT_CORE_LIBRARY_RELEASE - E:/Qt/4.4.1/lib/QtCore4.dll
QT_OPENGL_LIBRARY_DEBUG - E:/Qt/4.4.1/lib/QtOpenGLd4.dll
QT_OPENGL_LIBRARY_RELEASE - E:/Qt/4.4.1/lib/QtOpenGL4.dll
to
QT_CORE_LIBRARY_DEBUG - E:/Qt/4.4.1/lib/QtCored4.lib
QT_CORE_LIBRARY_RELEASE - E:/Qt/4.4.1/lib/QtCore4.lib
QT_OPENGL_LIBRARY_DEBUG - E:/Qt/4.4.1/lib/QtOpenGLd4.lib
QT_OPENGL_LIBRARY_RELEASE - E:/Qt/4.4.1/lib/QtOpenGL4.lib
The DLLs are executables, I suspect you'll find them in E:/Qt/4.4.1/bin - but you can't LINK to them - you should link to the LIBs. (You will need to ensure the E:/Qt/4.4.1/bin is referenced in your PATH environment).
Pete