我想在Windows的Visual Studio中使用Potrace来完成一个C++项目,但我不知道如何将Potrace包含到我的项目中。
我已经尝试使用Cygwin编译C文件,从而创建一个.a文件,并在Visual Studio中链接它,但这没有成功。Visual Studio能够识别Potrace函数,但是当运行一个测试程序时调用Potrace(Calling potrace_version() ),Visual Studio会出现“LNK2019 unresolved external symbol _potrace_version referenced in function_main”的错误。
我已经使用上述技术在Ubuntu上做到了这一点,然后通过以下方式编译我的代码: g++ main.cpp backenddxf.cpp ImageManipulation.cpp ./libubuntu/libpotrace.a -o test.out 'pkg-config --cflags --libs opencv
我需要将源代码(网站上称为“source distribution”)编译为一个lib文件,然后将其链接到我的项目中吗?如果是这样,该怎么做呢? 或者是我漏掉了什么东西。我正在使用Windows 10上的Visual Studio 2017。
我对C++的工作原理不是很精通,因此非常感谢详细的解释。
我已经使用上述技术在Ubuntu上做到了这一点,然后通过以下方式编译我的代码: g++ main.cpp backenddxf.cpp ImageManipulation.cpp ./libubuntu/libpotrace.a -o test.out 'pkg-config --cflags --libs opencv
我需要将源代码(网站上称为“source distribution”)编译为一个lib文件,然后将其链接到我的项目中吗?如果是这样,该怎么做呢? 或者是我漏掉了什么东西。我正在使用Windows 10上的Visual Studio 2017。
我对C++的工作原理不是很精通,因此非常感谢详细的解释。