Code Monkey home page Code Monkey logo

libprotobuf's People

Contributors

thejinchao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libprotobuf's Issues

Compile protobuf with Visual Studio 2017 and integrate with UE4

Hi,

I already compiled protobuf with visual studio 2017 ( static compile in 64 bits)
To validate the result I have developed a simple console application to check if I can use the *.pb.cc and *.pb.h files
Everything is ok

Next step I tried to incorporate in a unreal engine 4 project. Set up a build files

File.Build.cs

...
PublicIncludePaths.Add(ModulePath + "/Include");
PublicLibraryPaths.Add(ModulePath + "/Lib");

    PublicAdditionalLibraries.Add("libprotobuf.lib");

...

But it gave me strange compile errors

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\INCLUDE\type_traits(565): error C4647: behavior change: __is_pod(google::protobuf::internal::AuxillaryParseTableField) has different value in previous versions

...\Include\google/protobuf/generated_message_table_driven.h(159): note: see reference to class template instantiation 'std::is_podgoogle::protobuf::internal::AuxillaryParseTableField' being compiled

...\Messages.pb.h(992): warning C4668: 'PROTOBUF_INLINE_NOT_IN_HEADERS' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
...\Include\google/protobuf/descriptor.pb.h(4113): warning C4668: 'PROTOBUF_INLINE_NOT_IN_HEADERS' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
...\Messages.pb.cc(258): error C4125: decimal digit terminates octal escape sequence
...\Messages.pb.cc(259): error C4125: decimal digit terminates octal escape sequence

Search on web but I haven't mutch success: Example this error is real strange !!!!

"...\MSVC\14.11.25503\INCLUDE\type_traits(565): error C4647: behavior change: __is_pod(google::protobuf::internal::AuxillaryParseTableField) has different value in previous versions .."

Have you tried to compile this source code with recent versions of Protobuf and Visual Studio ?

Protocol Buffer 3.3.0
Visual Studio 2017
Release 64 bits

Regards
Nelson Bilber

Some error were encountered while trying to compile protobuf for PS4

Environment:

  • UE4.26.2
  • Protobuf 3.19.4
  • VS2017
  • clang tool chain v17 10.0.1-centos7
  • cmake 3.22.3
  • PS4 SDK 8.000

Encountered following problems:

  1. CMakeList.txt specified to build with c++11, however some header files of PS4 SDK have following macro definitions which caused build failure:
#if __cplusplus<=201103L  
  #error This version of C++ is not compatible with the standard library implementation. 
#endif

I made it work by changing the specified c++ version from 11 to 14 in CMakeList.txt

  1. Some header files of protobuf have following code which also caused build failure:
#elif defined(__FreeBSD__)  
#include <sys/endian.h>  // __BYTE_ORDER

Compiler can't find this header file because I am building these files on Windows platform. It works after I modified this code block to

#elif defined(__FreeBSD__)
#define PROTOBUF_LITTLE_ENDIAN 1
  1. Finally I don't know how to solve following errors because I am not a C++ developer but a golang developer QAQ

G:\protobuf-3.19.4\src\google\protobuf\arena_impl.h(534,44): error : alignment (64) of thread-local variable 'thread_cache' is greater than the maximum supported alignment (32) for a thread-local variable on this target [G:\protobuf-3.19.4\cmake\build\PS4\libprotobuf.vcxproj]

G:\protobuf-3.19.4\src\google\protobuf\stubs\mutex.h(124,13): error : constexpr constructor never produces a constant expression [-Winvalid-constexpr] [G:\protobuf-3.19.4\cmake\build\PS4\libprotobuf.vcxproj]

Package Failed in UE4.27.1 Source code version

I have done what you said. In Editor it works very well. But when I package the game, it gives me errors as follows. But if I delete the libprotobuf folder from ThirdParty it is OK with no error.

UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject=E:/Projects/MyProject2/MyProject2.uproject BuildCookRun -nocompileeditor -nop4 -project=E:/Projects/MyProject2/MyProject2.uproject -cook -stage -archive -archivedirectory=E:/Projects/MyProject2 -package -ue4exe=D:\ProgramFiles\UES_427M\Engine\Binaries\Win64\UE4Editor-Cmd.exe -c
ompressed -ddc=DerivedDataBackendGraph -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -clientconfig=Development -utf8output -compile
UATHelper: Packaging (Windows (64-bit)): Dependencies are out of date. Compiling scripts....
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\VisualStudio2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3245: 未能解析此引用。未能找到程序集“Windows”。请检查磁盘上是否存在该程序集。 如果您的代码需要此引用,则可能出现编译错误。 [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(17,15): error CS0234: 命名空间“Windows”中不存在类型或命名空间名“Management”(是否缺少程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,24): error CS0246: 未能找到类型或命名空间名“IAsyncOperationWithProgress<,>”(是否缺少 using 指令或程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,52): error CS0246: 未能找到类型或命名空间名“DeploymentResult”(是否缺少 using 指令或程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,70): error CS0246: 未能找到类型或命名空间名“DeploymentProgress”(是否缺少 using 指令或程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Took 1.7939787s to run MSBuild.exe, ExitCode=1
UATHelper: Packaging (Windows (64-bit)): ERROR: Failed to build "D:/ProgramFiles/UES_427M/Engine/Programs/AutomationTool/Saved\UATTempProj.proj":
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\VisualStudio2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3245: 未能解析此引用。未能找到程序集“Windows”。请检查磁盘上是否存在该程序集。 如果您的代码需要此引用,则可能出现编译错误。 [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(17,15): error CS0234: 命名空间“Windows”中不存在类型或命名空间名“Management”(是否缺少程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,24): error CS0246: 未能找到类型或命名空间名“IAsyncOperationWithProgress<,>”(是否缺少 using 指令或程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,52): error CS0246: 未能找到类型或命名空间名“DeploymentResult”(是否缺少 using 指令或程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,70): error CS0246: 未能找到类型或命名空间名“DeploymentProgress”(是否缺少 using 指令或程序集引用?) [D:\ProgramFiles\UES_427M\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)):
UATHelper: Packaging (Windows (64-bit)): (see D:\ProgramFiles\UES_427M\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
PackagingResults: Error: Failed to build "D:/ProgramFiles/UES_427M/Engine/Programs/AutomationTool/Saved\UATTempProj.proj":
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.