Can not run qxService examples

Forum for posting problems using QxOrm library

Re: Can not run qxService examples

Postby nickla » Thu Jul 12, 2012 5:19 pm

Thank you for your QxOrm. I run it successfuly after compiling with MSVC
nickla
 
Posts: 52
Joined: Wed Jul 11, 2012 4:19 pm
Location: Russia

Re: Can not run qxService examples

Postby QxOrm admin » Thu Jul 12, 2012 7:27 pm

There is no way to compile and run QxOrm with MinGW using shared libs.

Wrong ! All samples from ./test/ directory work perfectly for me using MinGW and shared libs.

Thank you for your QxOrm. I run it successfuly after compiling with MSVC

Good news ! Now enjoy with QxOrm library... ;)
QxOrm admin
 

Re: Can not run qxService examples

Postby KerLaeda » Mon Jul 23, 2012 3:05 am

QxOrm admin wrote:
It is QxOrm dll problem

The problem is the way to export/import symbols from DLL.
You seems to have an option in your MinGW config that I don't have in my dev environment : auto-importing.
If you look into QxOrm.pri file, you can find this line : win32-g++: QMAKE_LFLAGS += -export-all-symbols ==> this is the only way I found to execute QxOrm samples without error (built using MinGW).
Maybe -export-all-symbols and auto-importing of MinGW compiler/linker options are not compatible ?

I have same problem.
When i add
Code: Select all
win32-g++: QMAKE_LFLAGS += -export-all-symbols -Wl,-enable-auto-import

in QxOrm.pri all works fine.
Please, fix it in next release.
PS: and thank you for QxORM :)
KerLaeda
 
Posts: 1
Joined: Mon Jul 23, 2012 2:59 am

Re: Can not run qxService examples

Postby QxOrm admin » Mon Jul 23, 2012 8:37 am

When i add : win32-g++: QMAKE_LFLAGS += -export-all-symbols -Wl,-enable-auto-import
in QxOrm.pri all works fine. Please, fix it in next release.
PS: and thank you for QxORM :)

Thx for the tip ;)

I just tested on my dev environment and it worked for me too with your flags (so this is not a regression since all worked fine for me without your patch).
So I will include your patch in the next release of QxOrm library (1.2.5)...

If I look at my linker output traces, I can see that the option is set 2 times (1 provided by default by Qt config, and 1 defined in QxOrm.pri file with your patch) :
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -export-all-symbols -Wl,-enable-auto-import -shared -mthreads -Wl -Wl,--out-i
mplib,debug\libQxOrmd.a -o debug\QxOrmd.dll object_script.QxOrmd.Debug -L"d:\Dv
lp\_Libs\Qt\4.7.0_MINGW\lib" -LD:/Dvlp/_Libs/Boost/1_49/lib_shared -llibboost_se
rialization-mgw45-mt-d-1_49 -lQtSqld4 -lQtXmld4 -lQtGuid4 -lQtNetworkd4 -lQtCored4
Creating library file: debug\libQxOrmd.a
mingw32-make[1]: Leaving directory `D:/Dvlp/_Perso/QxOrm'


And on Qt forums, they said that this flag has been removed from the default config of Qt using MinGW (reported as a bug in Qt !).
More details here : http://www.qtcentre.org/threads/44540-q ... uto-import
And here : http://qt-project.org/forums/viewthread/10079

So thank you, QxOrm library must have the option -enable-auto-import, and there are some versions of Qt without this default parameter !
QxOrm admin
 

Re: Can not run qxService examples

Postby nickla » Thu Jul 26, 2012 10:33 am

Anyway, MSVC is better to use in Windows.
nickla
 
Posts: 52
Joined: Wed Jul 11, 2012 4:19 pm
Location: Russia

Previous

Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 6 guests