DLLSample CTestAll.qx.cpp

Forum for posting problems using QxOrm library

DLLSample CTestAll.qx.cpp

Postby caseybasichis » Sat May 12, 2012 7:33 am

Hi,

I'm getting some errors in trying to compile the DLL example. It seems like the dll2 is not building and I suppose that is preventing the exe from building as well. Dll1 builds as does qxorm.

This is the last portion of the error after deleting the file and letting it rebuild it, usually it just says that its corrupt. I also tried the 1.2.3 version but it was there.


C:\Develop\QxOrm\1.2.4\QxOrm\include\QxRegister/QxClass.h(166) : see reference to class template instantiation 'qx::QxCollection<Key,Value>' being compiled
3> with
3> [
3> Key=QString,
3> Value=qx::IxFunction_ptr
3> ]
3> C:\Develop\QxOrm\1.2.4\QxOrm\include\QxRegister/QxClass.h(161) : while compiling class template member function 'void qx::QxClass<T>::beforeRegisterClass(void)'
3> with
3> [
3> T=CTestAll
3> ]
3> qx\CTestAll.qx.cpp(7) : see reference to class template instantiation 'qx::QxClass<T>' being compiled
3> with
3> [
3> T=CTestAll
3> ]
3>C:\Develop\QxOrm\1.2.4\QxOrm\test\qxDllSample\dll2\qx\CTestAll.qx.cpp : fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj
3>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.EXE"' : return code '0x1'
3> Stop.
3>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe"' : return code '0x2'
3> Stop.
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "qmake & nmake debug" exited with code 2.
3>
3>Build FAILED.
3>
3>Time Elapsed 00:00:24.46
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I'm trying to corral this together with an example project from the WDL library - which also creates a dll vst plugin. I'm guessing that pushing the QxOrm project settings into the WDL example project is the more complex task because all of the Qt and qmake stuff and that I should try to get the WDL integrated into the QxOrm example? I haven't built a dll before so Im a little confused.

Thanks,
Casey
caseybasichis
 

Re: DLLSample CTestAll.qx.cpp

Postby QxOrm admin » Sat May 12, 2012 10:28 am

Hi,

The most important part of your error is :
fatal error C1128: number of sections exceeded object file format limit

Don't worry about that ;)
I already had the same error with mingw, but never with MSVC2010 : maybe because you are compiling a 64bits version (?).

To remove your error :
1- just open the file : ./test/qxDllSample/dll2/qx/CTestAll.qx.cpp ;
2- then, replace the line : #if ((! defined(Q_OS_WIN)) || (! defined(__GNUC__))) // MinGW memory bug ?
3- by the line : #if (0)
This way, you will not register some data-members and it should compile fine...

Don't worry about this error : the CTestAll class is an ultimate test, and it should never happen in a production program.
There is too many template instantiations into the same *.cpp file.

I will fix this error for the next version of QxOrm library putting a #if (0) into CTestAll.qx.cpp file...
QxOrm admin
 

Re: DLLSample CTestAll.qx.cpp

Postby caseybasichis » Sat May 12, 2012 7:55 pm

That solved the build issue, so it completes successfully but loads an error on the run:

Unable to start program
'C:\Develop\QxOrm\1.2.4\QxOrm\tes\qxDllSample\dll1\debug/dll1.dll'
'
The system cannot find the file specified.

I know that dll's aren't executed, but the path is odd and i don't see any dll files being created. Any idea what might be the cause?
caseybasichis
 

Re: DLLSample CTestAll.qx.cpp

Postby QxOrm admin » Sun May 13, 2012 10:50 am

Unable to start program
'C:\Develop\QxOrm\1.2.4\QxOrm\tes\qxDllSample\dll1\debug/dll1.dll'

You already had the same issue in your previous topic here (with qxBlog project) :
viewtopic.php?f=2&t=128

I don't know what is wrong with your dev environment (?).
All tests projects are built into ./test/_bin/ directory of QxOrm package : into this directory, you must see : dll1[d].dll, dll2[d].dll and exe[d].dll.
You could change the target of your MSVC2010 project to point to the good directory and executable (but this is not the normal behaviour because it works perfectly for me with MSVC2010).
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron