简体   繁体   中英

protobuf linking errors with MingW

Currently I am my writing cpp app on MingW which uses protobuf. But during compilation, it shows lots of linker errors, saying

undefined reference to google::protobuf::internal

and

undefined reference to google::protobuf::message.

I have already included -L/path/to/lib/ -lprotobuf in gcc.

But still not working..
Any input?

Make shure you followed the installtion stepps correctly: How to build Google's protobuf in Windows using MinGW?

Especially take a look at 5. , --prefix part:

The --prefix paramater makes sure protobuf is installed in the mingw directory tree instead of the MSYS directories, so you can build outside the MSYS shell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM