Linker error, what's missing?

Forum for posting problems using QxOrm library

Linker error, what's missing?

Postby gianks » Mon Jul 25, 2016 1:05 am

HI,
i'm trying to debug this linker error but even if i commented out anything the compilation fails reporting the following and i cannot really understand what's causing it:

Code: Select all
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:69: riferimento non definito a "operator<<(QDataStream&, NGS::GSS::GssLiveProgramMedia const&)"
build/Debug/GNU-Linux/ORM_LiveProgram.o: nella funzione "qx::QxBool qx::serialization::qt::from_byte_array<NGS::GSS::GssLiveProgramMedia>(NGS::GSS::GssLiveProgramMedia&, QByteArray const&, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:85: riferimento non definito a "operator>>(QDataStream&, NGS::GSS::GssLiveProgramMedia&)"
collect2: error: ld returned 1 exit status


I'm sure is a typo or something similar but i cannot see it :shock:
Thanks
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Linker error, what's missing?

Postby qxorm » Mon Jul 25, 2016 8:29 am

Hello,

Have you tried a full rebuild of your project ?
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Linker error, what's missing?

Postby gianks » Mon Jul 25, 2016 9:43 am

Hi,
off course i did... any idea? :?
What's strange to me is having copied some working classes and making them working, all except one... and i can't see what's different in the two!
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Linker error, what's missing?

Postby qxorm » Mon Jul 25, 2016 12:23 pm

all except one... and i can't see what's different in the two!

Could you please share your classes code source : one which is working, and one which is not working ?
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Linker error, what's missing?

Postby gianks » Mon Jul 25, 2016 3:23 pm

Hi,
i've found the cause but not the reason for that: one of the other classes has been modified to add a relation in this way:

Code: Select all
        t.relationManyToOne(& NGS::GSS::Server::GssLiveProgram::defaultProgram, "defaultProgram_id");


If i comment out this line the program compiles successfully... shall i implement something additional when using relationships?
The only thing i didn't do as in the tutorial are the typedef in the end of each object .h for it's pointer and list pointer, which i didn't understand why should be done!

Many thanks
Gianluca
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Linker error, what's missing?

Postby gianks » Mon Jul 25, 2016 4:21 pm

To be sure i'm doing things right i've created starting from the online tutorial a couple of test classes, Blog and Comment, with a simple N-1 relationship.
The result is sadly the same... at this point i've no other clues.
Code: Select all
build/Debug/GNU-Linux/comment.o: nella funzione "QByteArray qx::serialization::qt::to_byte_array<blog>(blog const&, void*, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:69: riferimento non definito a "operator<<(QDataStream&, blog const&)"
build/Debug/GNU-Linux/comment.o: nella funzione "qx::QxBool qx::serialization::qt::from_byte_array<blog>(blog&, QByteArray const&, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:85: riferimento non definito a "operator>>(QDataStream&, blog&)"


Here the classes:
blog.h
Code: Select all
#ifndef _QX_BLOG_BLOG_H_
#define _QX_BLOG_BLOG_H_

class blog;

class GSS_DLL_EXPORT blog
{
public:
// -- typedef
   typedef boost::shared_ptr<blog> blog_ptr;
// -- properties
   long        m_id;
// -- constructor, virtual destructor
   blog() : m_id(0) { ; }
   virtual ~blog() { ; }
};

QX_REGISTER_HPP_GSS(blog, qx::trait::no_base_class_defined, 0)

typedef boost::shared_ptr<blog> blog_ptr;
typedef QList<blog_ptr> list_blog;

#endif // _QX_BLOG_BLOG_H_



blog.c
Code: Select all
#include "GSS/QxOrm/precompiled.h"
#include "blog.h"
#include <QxMemLeak.h>

QX_REGISTER_CPP_GSS(blog)

namespace qx {
template <> void register_class(QxClass<blog> & t)
{
   t.id(& blog::m_id, "id");

}}



comment.h
Code: Select all
#ifndef _QX_BLOG_COMMENT_H_
#define _QX_BLOG_COMMENT_H_

class blog;

class GSS_DLL_EXPORT comment
{
public:
// -- typedef
   typedef boost::shared_ptr<blog> blog_ptr;
// -- properties
   long        m_id;
   QString     m_text;
   QDateTime   m_dt_create;
   blog_ptr    m_blog;
// -- constructor, virtual destructor
   comment() : m_id(0) { ; }
   virtual ~comment() { ; }
};

QX_REGISTER_HPP_GSS(comment, qx::trait::no_base_class_defined, 0)

typedef boost::shared_ptr<comment> comment_ptr;
typedef QList<comment_ptr> list_comment;

#endif // _QX_BLOG_COMMENT_H_




comment.c
Code: Select all
#include "GSS/QxOrm/precompiled.h"

#include "comment.h"
#include "blog.h"

#include <QxMemLeak.h>

QX_REGISTER_CPP_GSS(comment)

namespace qx {
template <> void register_class(QxClass<comment> & t)
{
   t.id(& comment::m_id, "comment_id");

   t.data(& comment::m_text, "comment_text");
   t.data(& comment::m_dt_create, "date_creation");

   t.relationManyToOne(& comment::m_blog, "blog_id");
}}
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Linker error, what's missing?

Postby gianks » Tue Jul 26, 2016 1:48 am

Hi,
i've spent some ( :shock: ) time on the problem and i think that the problem is not in the code but in the compiler/linker arguments.
I'm unable to see what's wrong but how make is calling g++ seems to be the issue.
Here the successfull run in the test folder of project qxBlogCpp11:

Code: Select all
make -f Makefile.Release
make[1]: ingresso nella directory "/usr/local/QxOrm/test/qxBlogCpp11"
g++ -m64 -pipe -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_RELEASE -D_BUILDING_QX_BLOG -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iinclude -I../../../../include -I../../../QxOrm/include -I../../../../include/x86_64-linux-gnu/qt5 -I../../../../include/x86_64-linux-gnu/qt5/QtGui -I../../../../include/x86_64-linux-gnu/qt5/QtSql -I../../../../include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I../../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -x c++-header -c include/precompiled.h -o release/qxBlogCpp11.gch/c++
g++ -c -include release/qxBlogCpp11 -m64 -pipe -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_RELEASE -D_BUILDING_QX_BLOG -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iinclude -I../../../../include -I../../../QxOrm/include -I../../../../include/x86_64-linux-gnu/qt5 -I../../../../include/x86_64-linux-gnu/qt5/QtGui -I../../../../include/x86_64-linux-gnu/qt5/QtSql -I../../../../include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I../../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/author.o src/author.cpp
g++ -c -include release/qxBlogCpp11 -m64 -pipe -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_RELEASE -D_BUILDING_QX_BLOG -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iinclude -I../../../../include -I../../../QxOrm/include -I../../../../include/x86_64-linux-gnu/qt5 -I../../../../include/x86_64-linux-gnu/qt5/QtGui -I../../../../include/x86_64-linux-gnu/qt5/QtSql -I../../../../include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I../../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/blog.o src/blog.cpp
g++ -c -include release/qxBlogCpp11 -m64 -pipe -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_RELEASE -D_BUILDING_QX_BLOG -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iinclude -I../../../../include -I../../../QxOrm/include -I../../../../include/x86_64-linux-gnu/qt5 -I../../../../include/x86_64-linux-gnu/qt5/QtGui -I../../../../include/x86_64-linux-gnu/qt5/QtSql -I../../../../include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I../../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/category.o src/category.cpp
g++ -c -include release/qxBlogCpp11 -m64 -pipe -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_RELEASE -D_BUILDING_QX_BLOG -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iinclude -I../../../../include -I../../../QxOrm/include -I../../../../include/x86_64-linux-gnu/qt5 -I../../../../include/x86_64-linux-gnu/qt5/QtGui -I../../../../include/x86_64-linux-gnu/qt5/QtSql -I../../../../include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I../../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/comment.o src/comment.cpp
g++ -c -include release/qxBlogCpp11 -m64 -pipe -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_RELEASE -D_BUILDING_QX_BLOG -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iinclude -I../../../../include -I../../../QxOrm/include -I../../../../include/x86_64-linux-gnu/qt5 -I../../../../include/x86_64-linux-gnu/qt5/QtGui -I../../../../include/x86_64-linux-gnu/qt5/QtSql -I../../../../include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I../../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/main.o src/main.cpp
g++ -m64 -Wl,-O1 -o ../../../QxOrm/test/_bin/qxBlogCpp11 release/author.o release/blog.o release/category.o release/comment.o release/main.o   -L/usr/X11R6/lib64 -L -l -L../../../QxOrm/test/_bin -lQxOrm -lQt5Gui -lQt5Sql -lQt5Core -lGL -lpthread -lboost_serialization


This is from a simple project based on the same source built with Netbeans:
Code: Select all
g++ -m64 -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -Inbproject -I. -I/usr/local/qhttp/src -I/usr/local/qhttp/src/private -isystem /usr/include/Qt5GStreamer -IHeaders -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/gstreamer-0.10 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I./include -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -x c++-header -c Headers/GSS/QxOrm/precompiled.h -o debug/qxBlog_GSS.gch/c++
g++ -c -include debug/qxBlog_GSS -m64 -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -Inbproject -I. -I/usr/local/qhttp/src -I/usr/local/qhttp/src/private -isystem /usr/include/Qt5GStreamer -IHeaders -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/gstreamer-0.10 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I./include -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/Debug/GNU-Linux/author.o src_11/author.cpp
g++ -c -include debug/qxBlog_GSS -m64 -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -Inbproject -I. -I/usr/local/qhttp/src -I/usr/local/qhttp/src/private -isystem /usr/include/Qt5GStreamer -IHeaders -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/gstreamer-0.10 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I./include -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/Debug/GNU-Linux/blog.o src_11/blog.cpp
g++ -c -include debug/qxBlog_GSS -m64 -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -Inbproject -I. -I/usr/local/qhttp/src -I/usr/local/qhttp/src/private -isystem /usr/include/Qt5GStreamer -IHeaders -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/gstreamer-0.10 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I./include -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/Debug/GNU-Linux/category.o src_11/category.cpp
g++ -c -include debug/qxBlog_GSS -m64 -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -Inbproject -I. -I/usr/local/qhttp/src -I/usr/local/qhttp/src/private -isystem /usr/include/Qt5GStreamer -IHeaders -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/gstreamer-0.10 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I./include -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/Debug/GNU-Linux/comment.o src_11/comment.cpp
g++ -c -include debug/qxBlog_GSS -m64 -pipe -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -D_QX_ENABLE_BOOST_SERIALIZATION -D_QX_CPP_11_SMART_PTR -D_QX_CPP_11_CONTAINER -D_QX_CPP_11_TUPLE -D_QX_ENABLE_BOOST_SERIALIZATION_BINARY -D_QX_ENABLE_BOOST_SERIALIZATION_XML -D_QX_MODE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -Inbproject -I. -I/usr/local/qhttp/src -I/usr/local/qhttp/src/private -isystem /usr/include/Qt5GStreamer -IHeaders -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/gstreamer-0.10 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I./include -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Iqt/moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/Debug/GNU-Linux/main.o src_11/main.cpp
g++ -m64 -o dist/Debug/GNU-Linux/qxBlog_GSS build/Debug/GNU-Linux/author.o build/Debug/GNU-Linux/blog.o build/Debug/GNU-Linux/category.o build/Debug/GNU-Linux/comment.o build/Debug/GNU-Linux/main.o   -L/usr/X11R6/lib64 -Wl,-rpath,/usr/lib /usr/lib/libqhttp.so -lQt5GStreamerUtils-1.0 -lQt5GStreamer-1.0 -lQt5GLib-2.0 /usr/local/lib/libctemplate.a -lgobject-2.0 -lglib-2.0 -lgstreamer-1.0 -lQxOrm -lboost_serialization -L -l -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Sql -lQt5Core -lGL -lpthread
build/Debug/GNU-Linux/blog.o: nella funzione "QByteArray qx::serialization::qt::to_byte_array<author>(author const&, void*, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:69: riferimento non definito a "operator<<(QDataStream&, author const&)"
build/Debug/GNU-Linux/blog.o: nella funzione "qx::QxBool qx::serialization::qt::from_byte_array<author>(author&, QByteArray const&, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:85: riferimento non definito a "operator>>(QDataStream&, author&)"
build/Debug/GNU-Linux/comment.o: nella funzione "QByteArray qx::serialization::qt::to_byte_array<blog>(blog const&, void*, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:69: riferimento non definito a "operator<<(QDataStream&, blog const&)"
build/Debug/GNU-Linux/comment.o: nella funzione "qx::QxBool qx::serialization::qt::from_byte_array<blog>(blog&, QByteArray const&, unsigned int)":
/usr/local/include/QxSerialize/QxSerializeQDataStream.h:85: riferimento non definito a "operator>>(QDataStream&, blog&)"
collect2: error: ld returned 1 exit status



Can someone see what's causing the problem in the second process?
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Linker error, what's missing?

Postby qxorm » Tue Jul 26, 2016 9:18 am

I would recommend to use QxEntityEditor to generate your project, at least for the beginning.

I think your problem is that you don't define the _BUILDING_YOUR_PROJECT compilation option.
More details here : https://www.qxorm.com/qxorm_en/tutorial.html#tuto_3
In this tutorial, the compilation option is named : _BUILDING_QX_BLOG
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Linker error, what's missing?

Postby gianks » Tue Jul 26, 2016 10:15 am

Thanks so much, compiled successfully!
gianks
 
Posts: 45
Joined: Mon Jul 04, 2016 1:04 pm

Re: Linker error, what's missing?

Postby qxorm » Tue Jul 26, 2016 12:29 pm

Thanks so much, compiled successfully!

Great !
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 6 guests

cron