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

Compile error on Windows system with VS2017 #150

Open
allenyeh1105 opened this issue Dec 28, 2019 · 3 comments
Open

Compile error on Windows system with VS2017 #150

allenyeh1105 opened this issue Dec 28, 2019 · 3 comments
Assignees

Comments

@allenyeh1105
Copy link

My problem can be spited into three parts.

  1. The cmake procedure cannot find my real opengl version. The error message is just like this issue: Could not detect GL version, assuming 3.0 #118

  2. Maybe due to the wrong opengl version, the warning "CMake Warning at config/OGLplusLib.cmake:62 (message):
    OGLplus library cannot be built!" would showed up during configuration.

  3. I can ignore the warning and generate the solution. But will have compile error. Just like Compile Errors in VS2017 #149
    "oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data"

Overall, I cannot successfully build the oglplus library. Is there any settings I should change to build the library? Thanks for your reply in advance.

@matus-chochlik matus-chochlik self-assigned this Dec 28, 2019
@matus-chochlik
Copy link
Owner

Hi,

@1. at the moment I don't have access to any windows machine with MSVC 2017, so if 1. is the same as in #118 and the detection segfaults I need someone with MSVC, to try and run the try_compiler executable in a debugger and find out why does it crash.

@2 This message on itself is not a problem. OGLplus should be usable without the library,

@3. Could you pls. paste the whole compiler output related to this error?
Also #define OGLPLUS_NO_GLFUNC_CHECKS 1 might get rid of this problem.

@allenyeh1105 allenyeh1105 changed the title Compile error on Windows system sith VS2017 Compile error on Windows system with VS2017 Dec 28, 2019
@allenyeh1105
Copy link
Author

@1. I can help the check but I'm not sure the steps. In my build/gl folder, i have "has_GL_3_1.cpp", "has_GL_3_2.cpp" ~ "has_GL_4_5.cpp". But I still get the detect version error.

@3. For the oglplus (Library\OGLplus\oglplus) project, my error message is
1>------ Build started: Project: oglplus (Library\OGLplus\oglplus), Configuration: Release x64 ------
1>object.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data
1>program.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data
1>prog_var.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data
1>extension.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data
1>shapes_utils.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data
1>shapes_blender.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/imports/blend_file/struct_block_data.hpp(152): error C2833: 'operator decltype' is not a recognized operator or type
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/imports/blend_file/struct_block_data.hpp(155): note: see reference to class template instantiation 'oglplus::imports::BlendFileFlatStructTypedFieldData' being compiled
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/imports/blend_file/struct_block_data.hpp(152): error C2059: syntax error: 'newline'
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/imports/blend_file/struct_block_data.hpp(152): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>C:\Users\yehallen\Documents\oglplus\implement\oglplus/shapes/blender_mesh.ipp(374): warning C4267: '+=': conversion from 'size_t' to 'GLuint', possible loss of data
1>debug_output.cpp
1>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
1>C:\Users\yehallen\Documents\oglplus\include\oglplus/glfunc.hpp(34): error C2165: 'left-side modifier': cannot modify pointers to data
1>Generating Code...
1>Done building project "oglplus.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

After I add #define OGLPLUS_NO_GLFUNC_CHECKS 1, that error disappear, but still have some others.

@matus-chochlik
Copy link
Owner

@1: The configure script has the --debug-config and --debug-gl-ver-error When you use both, it will cause the configuration to exit at the first GL version detection error and it will leave the try_compile executables in the build directory. When the config fails go to the build directory and IIRC there are some MSVC solutions. Try to open them and build them. If there are any build errors please paste them here, if any executables are built then try to run them in the MSVC debugger and see what happens.

@#: Paste the other error messages here please.

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