Compiler errors in QxEE Service generated code.
Posted: Tue Jan 26, 2016 2:28 pm
Hi
Not sure if this is a QxEE help question or QxORM...
First some info, as I've posted before with various questions... I am using Serialization enalbed, have build the required boost DLLs. I have set the QxORM projects to NOT static build, and I can build and run the qxClientServer tutorial code fine.
So after importing our database schema from an ODBC datasource, I have generated the Exported the C++ Entities Project. That compiles fine to a .DLL
Next I exported the Services Project. The export went ok in QxEE, and it has generated the project, but when compiling I hit a group of compiler errors relate to Input/Output parameters, such as:-
Function:-
Comiler errors are:-
...and...
There are hundres of similar errors. And there is another group of errors related to the "setService" call. Such as...
Code...
Compiler errors are:
And finally there is a 3rd group of compiling errors related to "setService" which are:-
Errors:
...and ...
As these all appear to be pointer/casting issues the C++ section of my QxORM.PRI file has all options defined, so reads
Any help appreciated?
Thanks
Steve.
Not sure if this is a QxEE help question or QxORM...
First some info, as I've posted before with various questions... I am using Serialization enalbed, have build the required boost DLLs. I have set the QxORM projects to NOT static build, and I can build and run the qxClientServer tutorial code fine.
So after importing our database schema from an ODBC datasource, I have generated the Exported the C++ Entities Project. That compiles fine to a .DLL
Next I exported the Services Project. The export went ok in QxEE, and it has generated the project, but when compiling I hit a group of compiler errors relate to Input/Output parameters, such as:-
Function:-
- Code: Select all
contact_address_ptr contact_address_services::fetchById(long id, const QStringList & columns /* = QStringList() */, const QStringList & relations /* = QStringList() */)
{
...
this->setInputParameter(input);
...
contact_address_output_ptr output = this->getOutputParameter();
...
Comiler errors are:-
- Code: Select all
C:\__Sum-It\Dorothy\code\crm\service\source\src\contact_address.services.gen.cpp:364: error: C2664: 'void qx::service::IxService::setInputParameter(qx::service::IxParameter_ptr)' : cannot convert argument 1 from 'services::contact_address_input_ptr' to 'qx::service::IxParameter_ptr'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
...and...
- Code: Select all
C:\__Sum-It\Dorothy\code\crm\service\source\src\contact_address.services.gen.cpp:367: error: C2440: 'initializing' : cannot convert from 'std::shared_ptr<OUTPUT>' to 'boost::shared_ptr<services::contact_address_output>'
with
[
OUTPUT=services::contact_address_output
]
No constructor could take the source type, or constructor overload resolution was ambiguous
There are hundres of similar errors. And there is another group of errors related to the "setService" call. Such as...
Code...
- Code: Select all
qx_bool contact_address_services_async::fetchById(contact_address_ptr p, const QStringList & columns /* = QStringList() */, const QStringList & relations /* = QStringList() */)
{
...
m_pAsyncHelper = qx::service::QxClientAsync_ptr(new qx::service::QxClientAsync());
...
m_pAsyncHelper->setService(pAsyncService, "fetchById");
...
}
Compiler errors are:
- Code: Select all
C:\__Sum-It\Dorothy\code\crm\service\source\src\contact_address.services_async.gen.cpp:48: error: C2664: 'void qx::service::QxClientAsync::setService(qx::service::IxService_ptr,const QString &)' : cannot convert argument 1 from 'services::contact_address_services_ptr' to 'qx::service::IxService_ptr'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
And finally there is a 3rd group of compiling errors related to "setService" which are:-
- Code: Select all
void dataset_operator_link_services_async::doAsyncFinished()
{
...
dataset_operator_link_services_ptr pAsyncService = boost::static_pointer_cast<dataset_operator_link_services>(m_pAsyncHelper->getService());
...
}
Errors:
- Code: Select all
C:\__Sum-It\Dorothy\code\crm\service\source\src\dataset_operator_link.services_async.gen.cpp:451: error: C2784: 'boost::intrusive_ptr<T> boost::static_pointer_cast(const boost::intrusive_ptr<U> &)' : could not deduce template argument for 'const boost::intrusive_ptr<U> &' from 'qx::service::IxService_ptr'
...and ...
- Code: Select all
C:\__Sum-It\Dorothy\code\crm\service\source\src\dataset_operator_link.services_async.gen.cpp:451: error: C2784: 'boost::shared_ptr<X> boost::static_pointer_cast(const boost::shared_ptr<U> &)' : could not deduce template argument for 'const boost::shared_ptr<U> &' from 'qx::service::IxService_ptr'
As these all appear to be pointer/casting issues the C++ section of my QxORM.PRI file has all options defined, so reads
- Code: Select all
# By default, QxOrm library supports smart pointers and containers of Qt library and boost library : QHash, QList, QSharedPointer, boost::shared_ptr, boost::unordered_map, etc...
# QxOrm library supports also by default containers of previous C++03 standard library : std::vector, std::list, std::map, std::set
# If you want to enable smart pointers and containers of the new C++11 standard library, you can define the compilation options _QX_CPP_11_SMART_PTR, _QX_CPP_11_CONTAINER and _QX_CPP_11_TUPLE :
# - With _QX_CPP_11_SMART_PTR : std::unique_ptr, std::shared_ptr, std::weak_ptr
# - With _QX_CPP_11_CONTAINER : std::unordered_map, std::unordered_set, std::unordered_multimap, std::unordered_multiset
# - With _QX_CPP_11_TUPLE : std::tuple
CONFIG += c++11
DEFINES += _QX_CPP_11_SMART_PTR
DEFINES += _QX_CPP_11_CONTAINER
DEFINES += _QX_CPP_11_TUPLE
Any help appreciated?
Thanks
Steve.