我在 c++ 代码下的 ubuntu 中工作。我正在使用 gsoap 来连接服务器。我已经获得了所有必要的数据。我也成功连接到服务器。我仍然有一个问题。为什么需要在命令行中写:g++ test_server.cpp -o testServ libgsoap++.a。如果我确实在我的文件夹中包含了所有依赖项,为什么我需要在命令行中包含 libgsoap++.a?编辑:
如果我不在命令行中包含 libgsoap++.a 我有:
undefined reference to `soap_embed'
/tmp/ccyeN0df.o: In function `soap_serialize_string(soap*, char* const*)':
TEST.cpp:(.text+0xb9de): undefined reference to `soap_reference'
/tmp/ccyeN0df.o: In function `soap_out_string(soap*, char const*, int, char* const*, char const*)':
TEST.cpp:(.text+0xba15): undefined reference to `soap_outstring'
/tmp/ccyeN0df.o: In function `soap_in_string(soap*, char const*, char**, char const*)':