Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osg3.6.5 mingw32 build osgQt osgqopenglwidget not declared #56

Open
dragonwl737 opened this issue Jul 29, 2022 · 3 comments
Open

osg3.6.5 mingw32 build osgQt osgqopenglwidget not declared #56

dragonwl737 opened this issue Jul 29, 2022 · 3 comments

Comments

@dragonwl737
Copy link

dragonwl737 commented Jul 29, 2022

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

@blobfish
Copy link

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
Copy link

Qt bug

@dragonwl737
Copy link
Author

dragonwl737 commented Dec 19, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants