osgQt icon indicating copy to clipboard operation
osgQt copied to clipboard

osg3.6.5 mingw32 build osgQt osgqopenglwidget not declared

Open dragonwl737 opened this issue 3 years ago • 3 comments

When I compile osgqt, the system prompts that the string atmoic cannot be found. It is not a complete type. Maybe the case of the file name cannot be correctly distinguished under Windows. After manually modifying the file name, it seems to work (is there any way to distinguish the file name). Then, there is an error osgQOpenGL__\include\osgQOpenGL\moc_osgQOpenGLWidget.cpp:64:6: error: 'osgQOpenGLWidget' has not been declared. How to modify the reference path with CMAKE-GUI? image

image image

dragonwl737 avatar Jul 29 '22 10:07 dragonwl737

Currently in this fight. The source of this problem is the combination of: Header files not having a header extension (.h, hxx), Qt moc, windows. I was using OSGRenderer as my test.

Here is the start of my moc_OSGRenderer.cpp on linux:

** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.6)
#include <memory>
#include "../../../../../subprojects/osgQt/include/osgQOpenGL/OSGRenderer"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>

Here is the start of my moc_OSGRenderer.cpp on windows:

** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.7)
#include <memory>
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>

You can see the missing include which results in a compile error. Looking at moc doc you can force the needed include with the -f option. I did this manually as a test on windows and it added the appropriate include. How to incorporate that into the build system? ... I have no idea. Why is moc recognizing the file as a header on linux and not on windows? ... I have no idea. As another test, I added '.h' to the header file on windows and then manually ran moc again and it added the appropriate include. osgQt isn't very big so I have it as a meson subproject and git submodule inside of my application. Meaning I don't build it and install it separate. I am thinking about just adding the '.h' to the header files inside my git repo of osgQt. I would be curious to hear from somebody on windows not having this problem? Any thoughts?

blobfish avatar Dec 15 '22 21:12 blobfish

Qt bug

blobfish avatar Dec 19 '22 01:12 blobfish

Thanks for your reply. I have found the problem. My OSG library should point to the wrong path  

太阳公公 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月19日(星期一) 上午9:10 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [openscenegraph/osgQt] osg3.6.5 mingw32 build osgQt osgqopenglwidget not declared (Issue #56)

Qt bug

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

dragonwl737 avatar Dec 19 '22 01:12 dragonwl737