Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/155.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Eclipse可以';t find-lprotobuf_C++_Eclipse_Linker_Mingw_Protocol Buffers - Fatal编程技术网

C++ Eclipse可以';t find-lprotobuf

C++ Eclipse可以';t find-lprotobuf,c++,eclipse,linker,mingw,protocol-buffers,C++,Eclipse,Linker,Mingw,Protocol Buffers,我目前正在尝试为C/C++环境设置GoogleProtobuf。 为了运行,项目需要库“libprotobuf.lib”,我保存在“C:/CustomMods”中。 现在,当我试图编译源代码时,“ld.exe”找不到指定的库。这是我的compile命令(是的,我添加了-L和-L) 我被困在这个问题上,如果有人能帮我,我会很高兴的 致以最诚挚的问候我用这篇精彩的教程设置了我的protobuf:g++“-LC:\\CustomMods”应该是g++-L“C:\\CustomMods”谢谢Praeto

我目前正在尝试为C/C++环境设置GoogleProtobuf。 为了运行,项目需要库“libprotobuf.lib”,我保存在“C:/CustomMods”中。 现在,当我试图编译源代码时,“ld.exe”找不到指定的库。这是我的compile命令(是的,我添加了-L和-L)

我被困在这个问题上,如果有人能帮我,我会很高兴的


致以最诚挚的问候

我用这篇精彩的教程设置了我的protobuf:
g++“-LC:\\CustomMods”
应该是
g++-L“C:\\CustomMods”
谢谢Praetorian的超快速回答,但不幸的是它没有帮助。我按照您的建议将编译命令更改为:g++-L“C:\\CustomMods”-o CProtoc.exe“src\\address.pb.o”“src\\CProtoc.o”-lprotobuf,但我仍然收到相同的错误!我不太确定那会起作用。我认为你问题的答案在于。使用
-llibprotobuf
而不是解决此问题的
-lprotobuf
,非常感谢!!
g++ "-LC:\\CustomMods" -o CProtoc.exe "src\\address.pb.o" "src\\CProtoc.o" -lprotobuf 
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lprotobuf