Visual Studio 2010 C++ /w Google Protocol Buffers. Cannot find 60 externals. Cannot compile

Needed to compile Protobuf correctly. There is a vsprojects folder. Just build ONLY the libprotobuf and add the libprotobuf.lib as reference to the project by going to:

Properties > Linker > Input : Additional Dependencies > Edit...

If you copied it to your project folder/google put in google/libprotobuf.lib

Everything should compile smoothly now.


If you are building protobufs as a DLL then you will also need to define PROTOBUF_USE_DLLS in your client application to get it to pull in the DLL import __declspec stuff properly.

See https://code.google.com/p/protobuf/issues/detail?id=308#c9 for details.

Tags:

C++