简体   繁体   English

使用.cpp和.h文件随附的C ++库

[英]Using C++ library that comes as .cpp and .h files

I'm trying to use this library: https://github.com/micknoise/Maximilian to do some DSP and am pretty new to C++ compilation which is leading me to some issues, 我正在尝试使用此库: https : //github.com/micknoise/Maximilian来做一些DSP,并且对于C ++编译来说还很新,这导致我遇到一些问题,

I'm using Visual Studio 15 and have successfully included a number of statically linked libraries that come in .lib and .a form but am confused on how to link the aforementioned code into my project since it does not come in a compiled form. 我使用的是Visual Studio 15,并且成功包含了许多以.lib和.a形式提供的静态链接库,但是由于如何将上述代码链接到我的项目中而感到困惑,因为它不是以经过编译的形式提供的。 Simply putting the unzipped project folder (which contains maximilian.h and then a /lib directory with the rest of the .c and .h files) into my include paths leads to linker errors. 只需将解压后的项目文件夹(包含maximilian.h,然后是/ lib目录以及其余的.c和.h文件)放入我的包含路径,就会导致链接器错误。 Am I missing a step? 我错过了一步吗?

Thanks to the help above, I was able to get the .lib file by opening the visual studio project and changing the export from .exe to .lib. 由于上述帮助,我可以通过打开Visual Studio项目并将导出从.exe更改为.lib来获取.lib文件。 I then included that in my project and things worked great. 然后,我将其包含在我的项目中,并且一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM