我下载了chilkat,我需要构建它...我有两个.sh文件。自述文件说:
To build the C and C++ samples, first edit the c_sampleBuild.sh and linkSample.sh scripts and set the "-L" option's path for the system libraries.
LinkSample.sh:
g++ -Wl,--enable-auto-import linkSample.cpp -o"linkSample.exe" -L. -libchilkat-9.5.0 -L/c/MinGW/lib -lcrypt32 -lws2_32 -ldnsapic_sampleBuild.sh:
#!/bin/bash -ev
gcc -c c_Sample.c -o"c_Sample.o"
g++ c_Sample.o -o"c_Sample.exe" -L. -lchilkat-9.5.0 -L/c/MinGW/lib -lcrypt32
-lws2_32 -ldnsapi现在很清楚我该怎么做了……请帮忙:)谢谢
发布于 2017-05-23 20:31:25
你还没有说你在什么平台上构建。但是如果你使用的是Windows + MinGW,那么:
可以从here下载crypt32、ws2_32和dnsapi的库
对于g++命令,-l (小写)选项告诉g++要链接到哪些附加库,而-L (大写)选项用于告诉g++在哪里查找这些库。
如果在当前文件夹(.)中有一个名为libbar.a的库文件然后添加选项(-L.-lbar)
或者,如果在/path/to/foo/libbar.a中有一个库,那么可以添加(-L/path/to/foo -lbar)。
您需要检查MinGW文档中系统库的位置,它们可能在/lib或/usr/lib中找到。
https://stackoverflow.com/questions/44123861
复制相似问题