1

I'm trying to get Google Protocol Buffers working with an Unreal-Engine-4 project in Visual Studio 2017.

It seems to be more complicated that I expected! I've seen lots of instructions to "change the projects settings on C++ -> code generation to Multi-threaded DLL (/MD)".

I can set this in CMakeList.txt when running a really simple CMake project ( and have got the addressboook example code working ) but can't find the option to do it in the VS2017 GUI when loaded from Unreal.

I can't find the "code generation" settings anywhere.

Project Properties Menu screenshot

  • any suggestions ?

Thanks.

drescherjm
  • 10,365
  • 5
  • 44
  • 64
Tim
  • 11
  • 4
  • Do you have a C++ project with some C++ source files? – user7860670 Apr 12 '19 at 15:44
  • You don't have a C++ project (managed by msbuild), you have an nmake project. All settings are in make files. – user7860670 Apr 12 '19 at 16:22
  • 1
    Sorry, to be clear, I have 2 projects: A VS2017 project and a CMAke project. When you use Unreal Engine 4 it generates a VS2017 C++ project automatically. I need to add Google Protocol buffers to that project. To test that I'd got the ProtoBuf side working I hand made a very simple , temporary, CMake project to play with. The key to getting that working was adding "set(CMAKE_CXX_FLAGS_RELEASE "/MT")" to CMakeList.txt. I now need to be able to do that to the UE4 generated project to get that to work. – Tim Apr 12 '19 at 16:23
  • Thanks @VTT . I didn't appreciate what UE4 was generating. ( My knowledge is Very out of date. ) I'll target my searching in the NMake direction. – Tim Apr 12 '19 at 16:43

1 Answers1

1

Right click on project -> Properties -> C/C++ -> Code Generation -> Runtime Library

Screenshot

Michael Chourdakis
  • 10,345
  • 3
  • 42
  • 78
  • :o) That's the problem : I don't get those options. I just get Configuration Properties and then General, Debugging, VC++ Directories and NMake. [1] – Tim Apr 12 '19 at 16:04