compilation error in ccComanndLineParser.cpp

All about Linux portage
Post Reply
corny335
Posts: 1
Joined: Mon Sep 19, 2011 9:38 am

compilation error in ccComanndLineParser.cpp

Post by corny335 »

Hello,
i faced the following compilations error:

./qCC/ccCommandLineParser.cpp: In member function ‘int ccCommandLineParser::parse(int, char**, bool, QDialog*)’:
./qCC/ccCommandLineParser.cpp:214:112: error: no matching function for call to ‘ccCommandLineParser::Export2BIN(ccCommandLineParser::CloudDesc, const char [18])’

./qCC/ccCommandLineParser.cpp:214:112: note: candidate is:
./qCC/ccCommandLineParser.cpp:102:9: note: static QString ccCommandLineParser::Export2BIN(ccCommandLineParser::CloudDesc&, QString)
./qCC/ccCommandLineParser.cpp:102:9: note: no known conversion for argument 1 from ‘ccCommandLineParser::CloudDesc’ to ‘ccCommandLineParser::CloudDesc&’
probably due to a new version of the gcc, maybe it was a warning in older gcc versions.

It was indeed not hard to fix:
I changed in file ccComanndLineParser.cpp:
QString errorStr = Export2BIN(CloudDesc(&result,cloudFilename,m_clouds.indexInFile),"RANDOM_SUBSAMPLED");
to :
CloudDesc cloudDesc(&result,cloudFilename,m_clouds.indexInFile);
QString errorStr = Export2BIN(cloudDesc,"RANDOM_SUBSAMPLED");

similarly, it needs to be done in line 246 and line 277.

maybe this can be fixed for a new release.

-Cornelius
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: compilation error in ccComanndLineParser.cpp

Post by daniel »

Yes, I always wonder why all those compilers change their policies all the time. But MSVC is known to be less strict about the norms, so gcc might be "right".

I've fixed this on the trunk.

Thanks for the feedback.

Daniel
Daniel, CloudCompare admin
Post Reply