compiling CloudCompare in debug mode

Feel free to ask any question here
Post Reply
zhuhaixiong
Posts: 15
Joined: Thu Feb 25, 2016 11:47 am

compiling CloudCompare in debug mode

Post by zhuhaixiong »

hello,when I compile cc in debug mode,It occurs some problem such as:
93 IntelliSense: "void (*)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam)" 类型的实参与 "GLDEBUGPROC" 类型的形参不兼容 e:\study\project\trunk-2.6.2\trunk-2.6.2\libs\qCC_glWindow\ccGLWindow.cpp 605 26 QCC_GL_LIB
错误 65 error LNK1104: 无法打开文件“..\libs\qCC_glWindow\Debug\QCC_GL_LIBd.lib” E:\study\project\trunk-2.6.2\cmake\ccViewer\LINK ccViewer
错误 92 error LNK1104: 无法打开文件“..\libs\qCC_glWindow\Debug\QCC_GL_LIBd.lib” E:\study\project\trunk-2.6.2\cmake\qCC\LINK CloudCompare
错误 32 error C2664: “void (GLDEBUGPROC,void *)”: 无法将参数 1 从“void (__cdecl *)(GLenum,GLenum,GLuint,GLenum,GLsizei,const GLchar *,GLvoid *)”转换为“GLDEBUGPROC” E:\study\project\trunk-2.6.2\trunk-2.6.2\libs\qCC_glWindow\ccGLWindow.cpp 605 1 QCC_GL_LIB
my software version is:VS2013+QT5.4+CMAKE3.4+trunk2.6.2
but there is no problem when I compile in release mode;
there is either noproblem when i compile trunk2.7 in the same condition.
how can i correct this problem!
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: compiling CloudCompare in debug mode

Post by daniel »

In fact CC only supports Qt 5.5+ now. But the differences are small, and mostly in debug mode.

You should either use Qt 5.5 or comment the part where QOpenGLDebugLogger is initialized in ccGLWindow (line 761).
Daniel, CloudCompare admin
zhuhaixiong
Posts: 15
Joined: Thu Feb 25, 2016 11:47 am

Re: compiling CloudCompare in debug mode

Post by zhuhaixiong »

line761 is “void ccGLWindow::resizeEvent(QResizeEvent *evt)”
on the one hand,you means I shoud makes some changes on ccGLWindow.cpp(line761)?
can you teach me how to change by detail?
i am a rookie in cc
on the other hand,you means i should change QT5.4 to qt5.5?right?
zhuhaixiong
Posts: 15
Joined: Thu Feb 25, 2016 11:47 am

Re: compiling CloudCompare in debug mode

Post by zhuhaixiong »

another problem :dose QT5.5 contain opengl?
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: compiling CloudCompare in debug mode

Post by daniel »

Yes.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: compiling CloudCompare in debug mode

Post by daniel »

The simpler would probably be to upgrade Qt and use 5.5 version.
Daniel, CloudCompare admin
zhuhaixiong
Posts: 15
Joined: Thu Feb 25, 2016 11:47 am

Re: compiling CloudCompare in debug mode

Post by zhuhaixiong »

thanks for you help,I have substituted the debug initilizing code in trunk 2.6.2(ccGLWindow.cpp line 624):
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);

//int value = 0;
//glGetIntegerv(GL_CONTEXT_FLAGS, &value);
//if ((value & GL_CONTEXT_FLAG_DEBUG_BIT) == 0)
//{
// ccLog::Warning("[3D View %i] But GL_CONTEXT_FLAG_DEBUG_BIT is not set!");
//}

glDebugMessageControl(GL_DONT_CARE,GL_DONT_CARE,GL_DONT_CARE,0,NULL,GL_TRUE);
//glDebugMessageControl(GL_DONT_CARE,GL_DEBUG_TYPE_OTHER,GL_DONT_CARE,0,NULL,GL_FALSE); //deactivate 'other' messages
glDebugMessageCallback(&GLDebugCallback, this);
by
trunk2.7 debug code(line761):
QOpenGLDebugLogger* logger = new QOpenGLDebugLogger(this);
logger->initialize();

connect(logger, SIGNAL(messageLogged(const QOpenGLDebugMessage&)), this, SLOT(handleLoggedMessage(const QOpenGLDebugMessage&)));
logger->enableMessages();
logger->disableMessages(QOpenGLDebugMessage::AnySource,
QOpenGLDebugMessage::DeprecatedBehaviorType
| QOpenGLDebugMessage::PortabilityType
| QOpenGLDebugMessage::PerformanceType
| QOpenGLDebugMessage::OtherType);
logger->startLogging(QOpenGLDebugLogger::SynchronousLogging);
/*glEnable(GL_DEBUG_OUTPUT);
and the problem maybe solved,because I has complile 2.6.2 in debug mode by qt successfully;
I will compile it in VS2013 in debug mode later.
thank you very much
Post Reply