Building project from QxEntityEditor
-
Hi,
it's the first time working with QxOrm library and QxEntityEditor.
I tried to build a Qt project after exporting it from QxEntityEditor. I can run qmake without any errors, but I can't build the project. The compiler can't find -lQxOrmd.
I have no idea what I can do.My project file:
include($$PWD/../QxOrm.pri)TEMPLATE = lib
CONFIG += dll
DEFINES += _BUILDING_MESSWERTE
INCLUDEPATH += $$PWD/../include
DESTDIR = $$PWD/bin/CONFIG(debug, debug|release) {
TARGET = messwerted
} else {
TARGET = messwerte
} # CONFIG(debug, debug|release)LIBS += -L"$$PWD/../lib"
CONFIG(debug, debug|release) {
LIBS += -l"QxOrmd"
} else {
LIBS += -l"QxOrm"
} # CONFIG(debug, debug|release)include($$PWD/messwerte.gen.pri)
!contains(DEFINES, _QX_UNITY_BUILD) {
SOURCES += $$PWD/src/messwerte_main.gen.cpp
} # !contains(DEFINES, _QX_UNITY_BUILD) -
@henrik2016 said in Building project from QxEntityEditor:
lQxOrmd
This is the debug build of that lib - do you have it?
-
I even tried to build the library, but it was canceled by an error.
debug/moc_IxModel.o:moc_IxModel.cpp:(.rdata$_ZTVN2qx7IxModelE[_ZTVN2qx7IxModelE]+0x178): undefined reference to `QAbstractItemModel::revert()'
collect2.exe: error: ld returned 1 exit status
NMAKE : fatal error U1077: "C:\Strawberry\c\bin\g++.EXE": Rückgabe-Code "0x1"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\Hostx64\x64\nmake.exe"": Rückgabe-Code "0x2"
Stop. -
@henrik2016 So, you're using Microsoft compiler. Was the QxOrm lib build using same compiler?
Can you build the project in release mode? -
The error was displayed when I was trying to build the QxOrm library. in debug and release mode too. I'm using the same compiler.
-
@henrik2016 I mean this: "I tried to build a Qt project after exporting it from QxEntityEditor"
-
Yes, I am using the same compiler.
-
@henrik2016 But did you try to build your Qt project in release mode instead of debug mode?
-
Yes, the same error occurs.
-
@henrik2016 Then the linker can't find the lib.
Is this really correct:LIBS += -L"$$PWD/../lib"
?
Also, you can check the linker call to see what exactly is passed to it. -
It's all fine now. I downloaded the library again. After that I used the MinGW compiler and now it works.