Page 1 of 2

Can not run qxService examples

PostPosted: Wed Jul 11, 2012 4:25 pm
by nickla
I have boost 1.50, Qt 4.8.1 on my Windows 7 x32.

I compiled boost and QxOrm without any problems. QxService examples are compiled too without any problems. But when i try to launch, for example, server, it crashes with error: During startup program exited with code 0xc0000005.

I'll appreciate any help. I realy need this qxService.

Re: Can not run qxService examples

PostPosted: Wed Jul 11, 2012 6:57 pm
by QxOrm admin
Hi,

I have boost 1.50, Qt 4.8.1 on my Windows 7 x32.

For information, I have not tested boost 1.50 yet, but I think that it should work without any problem.
Anyway, you could try to use my boost 1.49 package to be sure that your problem doesn't come from your boost compilation.
Here is my boost 1.49 package to download : http://www.qxorm.com/lib/boost_1_49.zip

What is your compiler : MSVC2008, MSVC2010, MinGW, other ?
Have you tried all other examples (qxBlog, qxDllSample) ?

Here are some basics steps to follow to install correctly your dev environment.
Just verify all those steps for your case :
1- Download and install Qt 4.8.X for MSVC2010 (or other) ;
2- Add Qt 'bin' directory to the PATH of Windows ;
3- Download my boost 1.49 package and unzip it : http://www.qxorm.com/lib/boost_1_49.zip ;
4- Add 'lib_shared' directory from my boost package to the PATH of Windows ;
5- Download QxOrm package and unzip it ;
6- Open 'QxOrm.pri' file and modify boost parameters (QX_BOOST_INCLUDE_PATH, QX_BOOST_LIB_PATH, etc.) ;
7- Open './test/qxBlog/qxBlog.sln' for example with MSVC2010, then try to build it and execute it ;
8- Test all examples from './test/' directory of QxOrm package.

Re: Can not run qxService examples

PostPosted: Wed Jul 11, 2012 7:09 pm
by nickla
I use mingw from Qt. I tried qxBlog and it works fine.

Anyway, thanks.

UPD: I tried to do following:

* Compile Boost 1.49 using bjam.exe --build-dir=build --toolset=gcc --with-serialization variant=debug,release link=shared threading=multi runtime-link=shared stage
* Open QxOrm in QTCreator
* Modify QxOrm.pri file
Code: Select all
QX_BOOST_INCLUDE_PATH = $$quote(D:/projects/boost_1_49_0/)
QX_BOOST_LIB_PATH = $$quote(D:/projects/boost_1_49_0/stage/lib)
QX_BOOST_LIB_SERIALIZATION_DEBUG = "boost_serialization-mgw44-mt-d-1_49"
QX_BOOST_LIB_SERIALIZATION_RELEASE = "boost_serialization-mgw44-mt-1_49"

* Run QxOrm/tools/mingw_build_all_debug.bat and QxOrm/tools/mingw_build_all_release.bat

I try to run qxServerd and it does not work.

UPD2: I try to compile and run qxDllSample. It is compiled successfully but run with same error.

Re: Can not run qxService examples

PostPosted: Wed Jul 11, 2012 8:32 pm
by nickla
I tried to set breakpoint to QApplication app(argc, argv); in main.cpp qxServer. It fails before this line.

Maybe this means something:
Code: Select all
g++ -export-all-symbols -Wl,-s -mthreads -Wl,-subsystem,windows -o ..\..\..\..\Q
xOrm\test\_bin\qxClient.exe release/main_dlg.o release/main.o release/moc_main_d
lg.o  -L"c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib" -lmingw32 -lqtmain -LC:/Boost/lib
-lboost_serialization-mgw44-mt-1_49 -L../../../../QxOrm/test/_bin -lQxOrm -lqxSe
rviceClient -lQtSql4 -lQtXml4 -lQtGui4 -lQtNetwork4 -lQtCore4
Info: resolving vtable for boost::archive::detail::oserializer<boost::archive::x
ml_oarchive, qx::service::QxTransaction> by linking to __imp___ZTVN5boost7archiv
e6detail11oserializerINS0_12xml_oarchiveEN2qx7service13QxTransactionEEE (auto-im
port)
Info: resolving vtable for boost::serialization::extended_type_info_typeid<qx::s
ervice::QxTransaction> by linking to __imp___ZTVN5boost13serialization25extended
_type_info_typeidIN2qx7service13QxTransactionEEE (auto-import)
Info: resolving typeinfo for boost::archive::detail::common_oarchive<boost::arch
ive::xml_oarchive> by linking to __imp___ZTIN5boost7archive6detail15common_oarch
iveINS0_12xml_oarchiveEEE (auto-import)
Info: resolving typeinfo for boost::archive::detail::oserializer<boost::archive:
:xml_oarchive, qx::service::QxTransaction> by linking to __imp___ZTIN5boost7arch
ive6detail11oserializerINS0_12xml_oarchiveEN2qx7service13QxTransactionEEE (auto-
import)
Info: resolving typeinfo for boost::serialization::extended_type_info_typeid<qx:
:service::QxTransaction> by linking to __imp___ZTIN5boost13serialization25extend
ed_type_info_typeidIN2qx7service13QxTransactionEEE (auto-import)
c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: warn
ing: auto-importing has been activated without --enable-auto-import specified on
 the command line.
This should work unless it involves constant data structures referencing symbols
 from auto-imported DLLs.
mingw32-make[1]: Leaving directory `D:/projects/QxOrm/test/qxClientServer/qxClient'


I got this warning after building project.

Re: Can not run qxService examples

PostPosted: Thu Jul 12, 2012 10:55 am
by QxOrm admin
I got this warning after building project.

I don't have any warning when I build all samples with MinGW (but I have a more recent version of MinGW).
Your warning seems to be the reason of your errors when you start your application.
If qxBlog works fine, and qxClientServer and qxDllSample projects doesn't work => that means that you have a problem when you register a class to the QxOrm context into a DLL (qxBlog is just an EXE).

auto-importing has been activated without --enable-auto-import specified on the command line. This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.

I don't know very well MinGW so I can't help you to resolve this warning.
But it makes sense with your error, so I think that you have to check this way to resolve your problem ;)

Re: Can not run qxService examples

PostPosted: Thu Jul 12, 2012 11:30 am
by nickla
I compiled boost 1.50 examples. They run fine. It is QxOrm dll problem.

qxBlog does not work too now. I`ll try to find out what is wrong. I realy need QxOrm functionality.

Re: Can not run qxService examples

PostPosted: Thu Jul 12, 2012 12:14 pm
by QxOrm admin
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 ?

Re: Can not run qxService examples

PostPosted: Thu Jul 12, 2012 12:49 pm
by nickla
What gcc version do you use?

Re: Can not run qxService examples

PostPosted: Thu Jul 12, 2012 4:24 pm
by QxOrm admin
D:\Dvlp\_Libs\MinGW\bin>gcc --version
gcc (GCC) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Re: Can not run qxService examples

PostPosted: Thu Jul 12, 2012 4:30 pm
by nickla
MinGW does not work. I use MSVC now. There is no way to compile and run QxOrm with MinGW using shared libs.