开发者

Qt + Google Protocol Buffers, Trouble linking libraries

开发者 https://www.devze.com 2023-01-23 14:12 出处:网络
Hopefully this is an easy question: I am building an application with Qt and would like to use Google\'s Protocol Buffers.I have downloaded and installed the protobuf source, now I开发者_Python百科 w

Hopefully this is an easy question:

I am building an application with Qt and would like to use Google's Protocol Buffers. I have downloaded and installed the protobuf source, now I开发者_Python百科 want to link against it in my project.

My .pro file contains the line:

LIBS += -L/usr/local/lib -libprotobuf

However, I get the error:

:: error: library not found for -llibprotobuf

when trying to compile.

I am assuming that I am doing something rather basic wrong. Thanks for any help!


Assuming the file is libprotobuf.[so|a], the correct library link command is -lprotobuf (the lib prefix is implied)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号