2
msvc2012를 사용하여 qt 프로젝트를 컴파일하는 데 문제가 있습니다. 어떤 이유에서인지 이해할 수없는 QString 함수와 같은 미해결 된 심볼이 있다고합니다.QString의 링커 문제?
{
QString file;
if(argc < 2)
{
qDebug() << "No file specified. Defaulting to russian.klc";
file = "russian.klc";
}
else
file = argv[1];
QFile input(file);
if(!input.open(QIODevice::ReadOnly | QIODevice::Text))
qDebug() << "File could not be opened";
QTextStream in(&input);
QString str;
KLayout * layout = new KLayout(file.split(".", QString::SkipEmptyParts)[0]);
while(!in.atEnd() && !(str = in.readLine()).contains("LAYOUT"));
in.readLine(); in.readLine(); in.readLine();in.readLine();
bool currChunk = true;
while(currChunk)
{
str = in.readLine();
if(str == "")
{
currChunk = false;
break;
}
QStringList parts = str.split("\t",QString::SkipEmptyParts);
layout->addKey(new Key(parts[0].toUInt(0,16),parts[3], parts[4]));
}
input.close();
//Starting deadkey finder
if(!input.open(QIODevice::ReadOnly | QIODevice::Text))
return -1;
QTextStream pass(&input);
while(!pass.atEnd() && !(str = pass.readLine()).contains("KEYNAME_DEAD"));
pass.readLine();
DeadKey * dkeys[10];
int i = 0;
while((str = pass.readLine()) != "") {
//qDebug() << "Line: " << str;
QStringList parts = str.split("\t",QString::SkipEmptyParts);
//1 is the name, 0 is the unicode value of the character
layout->addDeadKey(dkeys[i] = new DeadKey(parts[1], parts[0]));
i++;
}
//qDebug() << layout->printDeadKeys();
input.close();
// Find deadkey modifiers
bool cont = true;
i = 0;
input.open(QIODevice::ReadOnly | QIODevice::Text);
do {
while(!pass.atEnd() && !(str = pass.readLine()).contains("DEADKEY") && !(str.contains("KEYNAME")));
if(str.contains("KEYNAME")) {
cont = false;
break;
}
pass.readLine();
while((str = pass.readLine()) != "") {
//qDebug() << "Line: " << str;
QStringList parts = str.split("\t",QString::SkipEmptyParts);
//1 is the name, 0 is the unicode value of the character
//qDebug() << "Key to modify: " << parts[0] << "key result: " << parts[1];
dkeys[i]->addModifier(QChar(parts[0].toUInt(0,16)), QChar(parts[1].toUInt(0,16)));
}
i++;
}while(cont);
layout->implementModifiers();
//qDebug() <<layout->printMods();
layout->exportToQML(file.replace(".klc",".qml"));
return 0;
}
링커 오류
: 링커 문제가 참조하는 곳여기 내 .PRO 파일입니다 (이 프로그램이 여기에 커맨드는 단지 편의상
QT += core gui widgets
TARGET = klc2abuspro
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp \
key.cpp \
klayout.cpp \
deadkey.cpp
HEADERS += \
key.h \
klayout.h \
deadkey.h
OTHER_FILES +=
을위한 QT를 사용하여 만하고있다
main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __cdecl QString::operator=(class QString &&)" ([email protected]@[email protected][email protected]@Z) referenced in function main