Page 1 of 1

compale error on NormalDistribution.cpp.o

Posted: Mon Oct 15, 2012 7:43 am
by anagno
I am trying to compile on ubuntu 12.04 64bit the latest trunk and i am getting:

Code: Select all

anagno@laptop:~/Documents/CloudCompare/build$ make
[  3%] Built target triangle
Scanning dependencies of target CC_DLL
[  6%] Building CXX object CMakeFiles/CC_DLL.dir/src/NormalDistribution.cpp.o
In file included from /home/anagno/Documents/CloudCompare/CC/include/GenericCloud.h:28:0,
                 from /home/anagno/Documents/CloudCompare/CC/src/NormalDistribution.cpp:31:
/home/anagno/Documents/CloudCompare/CC/include/CCGeom.h: In static member function ‘static void CCVector3::vorthogonal(const Type*, Type*) [with Type = float]’:
/home/anagno/Documents/CloudCompare/CC/include/CCGeom.h:74:77:   instantiated from here
/home/anagno/Documents/CloudCompare/CC/include/CCGeom.h:127:3: error: ‘abs’ was not declared in this scope
make[2]: *** [CMakeFiles/CC_DLL.dir/src/NormalDistribution.cpp.o] Error 1
make[1]: *** [CMakeFiles/CC_DLL.dir/all] Error 2
make: *** [all] Error 2
Am i doing something wrong or is it a bug ???

Thanks in advance

Re: compale error on NormalDistribution.cpp.o

Posted: Mon Oct 15, 2012 9:09 am
by daniel
My bad. It must be once again something that works on visual only. I guess 'abs' should be replaced by 'fabs' for the sake of portability?

Can you confirm that it solves the issue? Then I'll fix this on the trunk. If there's other errors, don't hesitate to come back here or to mail me directly.

Thanks

P.S.: in general, I won't advise you to update the 'trunk' repository too often (it's always 'under construction'). Most users should wait for the new releases to be anounced (with the 'new release' newsletter). But I also need some guinea pigs, especially on linux 64 bits (I only have a 32bits distribution at home ;).

P.P.S. : by the way I've already fixed two other issues with the CMake configuration and the E57 filter (I was a bit tired yesterday evening ;).

Re: compale error on NormalDistribution.cpp.o

Posted: Mon Oct 15, 2012 10:15 am
by anagno
I confirm that fabs solve this problem, but now i have some other compilation problems. I will investigate later and i will report if there is more problems.

Thanks for your time

P.S.: I am installing it on a diffrent computer thats why i download the latest trunk ... Because am i using linux distros only (mainly ubuntu) it is easier to use the trunk version. It would be nice if someone could create a ppa for the ubuntu or a deb file.

P.P.S.: The qPCL plugin is a bit slow on linux. When i try to save to .pcd format it is very slow ... I will investigate further and i will report...

Re: compale error on NormalDistribution.cpp.o

Posted: Mon Oct 15, 2012 2:31 pm
by anagno
Hi again,


There are more problems on compilation:

Code: Select all

anagno@laptop:~/Documents/CloudCompare/build$ make
[  1%] Built target triangle
[ 11%] Built target CC_DLL
[ 11%] Built target GLEW
[ 12%] Built target CC_FBO
[ 12%] Building CXX object libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/ccExtru.cpp.o
/home/anagno/Documents/CloudCompare/libs/qCC_db/ccExtru.cpp:36:22: fatal error: PolyLine.h: No such file or directory
compilation terminated.
make[2]: *** [libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/ccExtru.cpp.o] Error 1
make[1]: *** [libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/all] Error 2
make: *** [all] Error 2
Would you advice me to update to a specific trunk version and if yes which one ???

Thanks in advance for your time and patience :)

Vasilis

P.S.: If you want i can become your guinea pig for ubuntu distro but be patience with me, because the knowledges i have in programming are not perfect :)

Re: compale error on NormalDistribution.cpp.o

Posted: Mon Oct 15, 2012 8:18 pm
by daniel
Hi,

the problem here is simply the upper case "L" of "PolyLine" (as Linux is case sensitive).

After fixing this, I've successfully compiled on Debian 32 bits (without qPCL and qRansacSD plugins enabled however).

Thanks for the feedback,

Re: compale error on NormalDistribution.cpp.o

Posted: Mon Oct 15, 2012 9:15 pm
by anagno
Hi,

Almost... My compiler is more grumpy :P

Code: Select all

anagno@laptop:~/Documents/CloudCompare/build$ make
[  1%] Built target triangle
[ 11%] Built target CC_DLL
[ 11%] Built target GLEW
[ 12%] Built target CC_FBO
[ 12%] Building CXX object libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/ccExtru.cpp.o
/home/anagno/Documents/CloudCompare/libs/qCC_db/ccExtru.cpp: In member function ‘virtual bool ccExtru::toFile_MeOnly(QFile&) const’:
/home/anagno/Documents/CloudCompare/libs/qCC_db/ccExtru.cpp:221:30: error: ambiguous overload for ‘operator<<’ in ‘outStream << ((const ccExtru*)this)->ccExtru::m_profile.std::vector<_Tp, _Alloc>::size [with _Tp = CCVector2, _Alloc = std::allocator<CCVector2>, std::vector<_Tp, _Alloc>::size_type = long unsigned int]()’
/home/anagno/Documents/CloudCompare/libs/qCC_db/ccExtru.cpp:221:30: note: candidates are:
/usr/include/qt4/QtCore/qdatastream.h:158:18: note: QDataStream& QDataStream::operator<<(qint8)
/usr/include/qt4/QtCore/qdatastream.h:230:21: note: QDataStream& QDataStream::operator<<(quint8)
/usr/include/qt4/QtCore/qdatastream.h:160:18: note: QDataStream& QDataStream::operator<<(qint16)
/usr/include/qt4/QtCore/qdatastream.h:233:21: note: QDataStream& QDataStream::operator<<(quint16)
/usr/include/qt4/QtCore/qdatastream.h:162:18: note: QDataStream& QDataStream::operator<<(qint32)
/usr/include/qt4/QtCore/qdatastream.h:236:21: note: QDataStream& QDataStream::operator<<(quint32)
/usr/include/qt4/QtCore/qdatastream.h:164:18: note: QDataStream& QDataStream::operator<<(qint64)
/usr/include/qt4/QtCore/qdatastream.h:239:21: note: QDataStream& QDataStream::operator<<(quint64)
/usr/include/qt4/QtCore/qdatastream.h:166:18: note: QDataStream& QDataStream::operator<<(bool)
/usr/include/qt4/QtCore/qdatastream.h:167:18: note: QDataStream& QDataStream::operator<<(float)
/usr/include/qt4/QtCore/qdatastream.h:168:18: note: QDataStream& QDataStream::operator<<(double)
/usr/include/qt4/QtCore/qdatastream.h:169:18: note: QDataStream& QDataStream::operator<<(const char*) <near match>
/usr/include/qt4/QtCore/qdatastream.h:169:18: note:   no known conversion for argument 1 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const char*’
/usr/include/qt4/QtCore/qchar.h:396:28: note: QDataStream& operator<<(QDataStream&, const QChar&)
/usr/include/qt4/QtCore/qbytearray.h:597:28: note: QDataStream& operator<<(QDataStream&, const QByteArray&) <near match>
/usr/include/qt4/QtCore/qbytearray.h:597:28: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QByteArray&’
/usr/include/qt4/QtCore/qstring.h:1080:28: note: QDataStream& operator<<(QDataStream&, const QString&) <near match>
/usr/include/qt4/QtCore/qstring.h:1080:28: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QString&’
/usr/include/qt4/QtGui/qcolor.h:274:38: note: QDataStream& operator<<(QDataStream&, const QColor&)
/usr/include/qt4/QtGui/qpolygon.h:109:27: note: QDataStream& operator<<(QDataStream&, const QPolygon&)
/usr/include/qt4/QtGui/qpolygon.h:175:27: note: QDataStream& operator<<(QDataStream&, const QPolygonF&)
/usr/include/qt4/QtGui/qmatrix.h:188:27: note: QDataStream& operator<<(QDataStream&, const QMatrix&)
/usr/include/qt4/QtGui/qtransform.h:355:27: note: QDataStream& operator<<(QDataStream&, const QTransform&)
/usr/include/qt4/QtGui/qpixmap.h:323:27: note: QDataStream& operator<<(QDataStream&, const QPixmap&) <near match>
/usr/include/qt4/QtGui/qpixmap.h:323:27: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QPixmap&’
/usr/include/qt4/QtGui/qbrush.h:166:27: note: QDataStream& operator<<(QDataStream&, const QBrush&) <near match>
/usr/include/qt4/QtGui/qbrush.h:166:27: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QBrush&’
/usr/include/qt4/QtGui/qpalette.h:262:27: note: QDataStream& operator<<(QDataStream&, const QPalette&) <near match>
/usr/include/qt4/QtGui/qpalette.h:262:27: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QPalette&’
/usr/include/qt4/QtGui/qfont.h:370:27: note: QDataStream& operator<<(QDataStream&, const QFont&) <near match>
/usr/include/qt4/QtGui/qfont.h:370:27: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QFont&’
/usr/include/qt4/QtGui/qsizepolicy.h:225:27: note: QDataStream& operator<<(QDataStream&, const QSizePolicy&)
/usr/include/qt4/QtGui/qcursor.h:171:27: note: QDataStream& operator<<(QDataStream&, const QCursor&)
/usr/include/qt4/QtGrui/qkeysequence.h:208:38: note: QDataStream& operator<<(QDataStream&, const QKeySequence&)
/usr/include/qt4/QtGui/qpen.h:125:38: note: QDataStream& operator<<(QDataStream&, const QPen&) <near match>
/usr/include/qt4/QtGui/qpen.h:125:38: note:   no known conversion for argument 2 from ‘std::vector<CCVector2>::size_type {aka long unsigned int}’ to ‘const QPen&’
make[2]: *** [libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/ccExtru.cpp.o] Error 1
make[1]: *** [libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/all] Error 2
make: *** [all] Error 2
I am guessing that it needs something like that:

Code: Select all

outStream << int (m_profile.size());
Cheers
Vasilis

Re: compale error on NormalDistribution.cpp.o

Posted: Tue Oct 16, 2012 7:31 am
by daniel
This time it's Qt 64 bits which is a bit picky ... (he doesn't how to handle 'unsigned' integers).

Can you test the new 'ccExtu.cpp' version on the trunk?

Thanks

Re: compale error on NormalDistribution.cpp.o

Posted: Tue Oct 16, 2012 6:28 pm
by anagno
Hi Daniel,

Sorry for me late reply but most of the day i was to my university. I confirm that now it compiles and runs correct.

Thanks for your time :)

P.S.: When ever you need a guinea pig for ubuntu just send me an email :)