I created a very simple Qt project that's using libsodium. (I can create a same project and build well with Visual Studio 2010/2013.) But Qt Creator cannot build: "main.obj:-1: error: LNK2019: unresolved external symbol sodium_init referenced in function main" This is my project: testSodium.pro:
QT += core
QT -= gui
TARGET = testSodium
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
DEFINES += SODIUM_STATIC
INCLUDEPATH += F:/libsodium-1.0.2-msvc/include
LIBS += -LF:/libsodium-1.0.2-msvc/Win32/Release/v120/static/ -llibsodium
SOURCES += main.cpp
main.cpp:
#include <sodium.h>
int main(int argc, char *argv[])
{
if (sodium_init() == -1) {
return 1;
}
}
Can you help me? (I'm using Qt Creator 3.3.1, Qt 5.4.1 MSVC 2010 32 bit)
Aucun commentaire:
Enregistrer un commentaire