gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.47k stars 772 forks source link

Build Issues with protobuf when building version 3.5 #2529

Closed gfyrtuwcv closed 3 months ago

gfyrtuwcv commented 3 months ago

I encountered a glyphs.pu.h error when building the latest osgearth,like this: image I don't want to use protobuf, but it will fail: MapboxGLGlyphManager.cpp(28,10): error C1083: Failed to open the include file: "glyphs.pb.h" : No such file or directory I fell back to osgearth3.4 without using protobuf to build successfully,and I would like to ask osgearth3.5 must use protobuf? Or is there any way to fix the error I encounter?

luoxiaozhu commented 3 months ago

try to remove the protobuf category in your cmake gui,then configure and generate

gfyrtuwcv commented 3 months ago

Unfortunately, this doesn't work, so it looks like I'll have to use osg3.4 until I find a solution

gwaldron commented 3 months ago

The source files are automatically generated by the protoc compiler, so perhaps you have multiple conflicting versions of protobuf installed, or your CMake configuration is pointing to an old version, or perhaps you just need a full rebuild to re-generate the sources with the newer version of protoc. Good luck.

gfyrtuwcv commented 3 months ago

I removed the vcpkg installation of protobuf and used an older version of protobuf, which enabled osgearth3.5 to compile successfully, thanks for your advice!

ComradeMashkov commented 3 months ago

I removed the vcpkg installation of protobuf and used an older version of protobuf, which enabled osgearth3.5 to compile successfully, thanks for your advice!

Hey, which version of protobuf did you use?

gfyrtuwcv commented 3 months ago

Hey, which version of protobuf did you use?

The version of protobuf I used was very old, 3.7.0

ComradeMashkov commented 3 months ago

Hey, which version of protobuf did you use?

The version of protobuf I used was very old, 3.7.0

I see. I built protobuf v3.21.10 and it worked. I don't know why, but new versions of protobuf don't contain logger class, which was the reason for linker to crash.