[Solved] Integrating and building WSO2 WSF/C++ using qmake
I am trying to integrate the WSO2 WSF/C++ framework into my project, and I need to build it using qmake.
I recently "posted on StackOverflow":http://stackoverflow.com/questions/19865943/configuring-qt-pro-file-to-use-cl-exe-and-link-exe-to-fix-linking-errors but I still couldn't find a solution.
During the linking phase I get LNK2019 unresolved external symbol errors, as if I did not link the included headers, even though I added:
@INCLUDEPATH += "C:\wsfcpp\include"@
On the other hand, I managed to successfully build & run this project both with Eclipse and using terminal command lines. I just can't get it to build with qmake.
Do you have any suggestions? (yes I did clean / run qmake several times, it's not that).
Hi and welcome to devnet,
Did you add the necessary linking information ?
Yes, I already specified that as you can see in my StackOverflow post.
Check in what libraries the missing symbol can be found and add them to list
Well the missing symbols are related to OMElement and OMText, both classes of the WSO2 framework, and they're supposed to be in wso2_wsf.lib
Again, I successfully built the project both in Eclipse and in command line, but qmake just fails at it.
For info, here are the command lines for Windows:
@cl.exe /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "AXIS2_DECLARE_EXPORT" /D "AXIS2_SVR_MULTI_THREADED" /w /nologo /I %WSFCPP_HOME%\include /c hello.cpp@
@link.exe /nologo /LIBPATH:%WSFCPP_HOME%\lib axutil.lib axiom.lib axis2_parser.lib axis2_engine.lib wso2_wsf.lib /DLL /OUT:hello.dll *.obj@
Any ideas or suggestions?
Just to be on the safe side, are you sure you are using both libraries with the same architecture ? e.g. both are x86_64 ?
There is only one version for the libraries. Plus, it compiles fine using Eclipse and/or command line. So it's definitely something else...
The question is still valid. Are you sure you are using the same architecture for Qt and WSO2. You could be have a 32bit Qt and a 64bit WSO2 or the other way around
Alright so I tried with Qt 32bits and it's building correctly now, thanks for the hint.
It's still weird though, I don't see why Qt 64bits doesn't get along so well with a 32 bits framework.
It's not weird and has nothing to do with Qt. You can't mix libraries built for different architecture be it Qt, Boost or any other.
Well, how come it compiled, linked and executed just fine using Eclipse and command lines?
Where you using Qt with eclipse ?
Nope not at all, there's no need for Qt to run the WSO2 samples.
The you have your answer: the samples are configured to build with the current WSO2 framework, which is 32bit, eclipse was configured to build it in 32bit.
Alright I see, thanks again!
You're welcome !
Since everything is working now, please update the the thread title prepending [solved] so other forum users may know a solution has been found :)