PDA

View Full Version : compilation on Qt 4 under Windows platform



kfsc
2nd September 2013, 20:29
hi guy. please excuse me for disturbing you.

i have a serial problem. i'm developping web browser. and at the step of compilation, i had the following error:

":-1: erreur : LNK1104: impossible d'ouvrir le fichier 'qcncodecsd.lib'"

this is in french translated in english it is: no such file, unable to find 'qcncodecsd.lib'

and i don't know the real problem. my codes seem to be correct.

here is my .pro file(i mean a part):
CONFIG += static
QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico


here is also a part of my main.cpp file:

#ifndef QT_SHARED
#include <QtPlugin>

#ifndef Q_WS_WIN
Q_IMPORT_PLUGIN(qico)
#endif
#include <QtCore>
Q_IMPORT_PLUGIN(qcncodecs)
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
#endif


please i really need help as soon as possible.

thanks for anticipation to you members.

ChrisW67
2nd September 2013, 21:31
Did you build your static Qt libraries with debug libraries?

kfsc
3rd September 2013, 20:38
i think no. please excuse me, but can you explain clearly what you mean by "with debug libraries" to ensure that i had the good answer. thanks for your reply.

if that can help you, here is the entire contents of my .pro file. maybe you'll find the answer in it.



TEMPLATE = app
TARGET = QtWeb
DESTDIR = ./release
QT += network xml webkit
CONFIG += static
QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico
DEFINES += QT_NO_UITOOLS

INCLUDEPATH += ./tmp/moc/release_static \
. \
./tmp/moc/Release_static \
./tmp/rcc/Release_static

DEPENDPATH += .
MOC_DIR += ./tmp/moc/release_static
OBJECTS_DIR += release
UI_DIR += .
RCC_DIR += ./tmp/rcc/release_static

#Include file(s)
include(QtWeb.pri)

#Windows resource file
win32:RC_FILE = QtWeb.rc
macx {
QMAKE_CXXFLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
ICON = qtweb.icns
}

message("qmake finished.")

OTHER_FILES += \
qtc_packaging/debian_harmattan/rules \
qtc_packaging/debian_harmattan/README \
qtc_packaging/debian_harmattan/manifest.aegis \
qtc_packaging/debian_harmattan/copyright \
qtc_packaging/debian_harmattan/control \
qtc_packaging/debian_harmattan/compat \
qtc_packaging/debian_harmattan/changelog

thanks again for quick reply.

i think no. please excuse me, but can you explain clearly what you mean by "with debug libraries" to ensure that i had the good answer. thanks for your reply.

if that can help you, here is the entire contents of my .pro file. maybe you'll find the answer in it.



TEMPLATE = app
TARGET = QtWeb
DESTDIR = ./release
QT += network xml webkit
CONFIG += static
QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico
DEFINES += QT_NO_UITOOLS

INCLUDEPATH += ./tmp/moc/release_static \
. \
./tmp/moc/Release_static \
./tmp/rcc/Release_static

DEPENDPATH += .
MOC_DIR += ./tmp/moc/release_static
OBJECTS_DIR += release
UI_DIR += .
RCC_DIR += ./tmp/rcc/release_static

#Include file(s)
include(QtWeb.pri)

#Windows resource file
win32:RC_FILE = QtWeb.rc
macx {
QMAKE_CXXFLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
ICON = qtweb.icns
}

message("qmake finished.")

OTHER_FILES += \
qtc_packaging/debian_harmattan/rules \
qtc_packaging/debian_harmattan/README \
qtc_packaging/debian_harmattan/manifest.aegis \
qtc_packaging/debian_harmattan/copyright \
qtc_packaging/debian_harmattan/control \
qtc_packaging/debian_harmattan/compat \
qtc_packaging/debian_harmattan/changelog

thanks again for quick reply.

ChrisW67
4th September 2013, 00:31
The library 'qcncodecsd.lib' that is mentioned in the error message is a debug library. A release library would look like 'qcncodecs.lib'... no 'd'.
If you did not build your static Qt libraries to include debug version then this would explain the failure to build your project in debug mode.

Can you build your project in release mode?

kfsc
4th September 2013, 11:17
excuse me guy for being so tedious. i'm really a beginner. so please explain how to do that.

the truth is that: it is a project that i have downloaded from "3w.googlecode.com" and compiled on my computer in Qt 4.8.1.

so if there is a solutions whathever the solution, i'll use it.

thanks again for your good answer, and for trying to help me. i really need help.
thanks again to others members.

ChrisW67
4th September 2013, 22:41
Build in release mode:


qmake CONFIG+=release
nmake
# OR jom
# OR mingw32-make


You have downloaded what from Google Code?

kfsc
6th September 2013, 12:28
thanks again for you anwser and sorry for keeping silent.

i've downloaded the project QtWeb from Google Code. for more details here is the url of the downloading page: http://code.google.com/p/qtweb/downloads/list .

Please can explain me step by step how to implement the above Qt build Code that you gave to me. Sorry for disturbing you .

kfsc
7th September 2013, 20:29
please ChrisW67 help me. i need your help. and i'm also asking help to all other members