简体   繁体   English

在Visual Studio项目中创建包含文件夹和库文件夹

[英]Creating Include Folder and Lib folders in Visual Studio Projects

It looks to be a general approach when i download a lib from the internet, or install a sdk, that they hold a folder having a include and lib / bin folder. 当我从互联网上下载一个lib或安装一个sdk时,这似乎是一种通用方法,即它们持有一个包含include和lib / bin文件夹的文件夹。

Over the years I created several visual studio projects, c# or vc++ and wonder how people release their libs when doing them. 多年以来,我创建了多个Visual Studio项目,例如c#或vc ++,并想知道人们在执行它们时如何释放它们的库。 It found it fairly simple to make the libs come out in a lib folder and exes out in a bin folder. 它发现将lib放到lib文件夹中并将exe放到bin文件夹中相当简单。

Are there any easy ways to make visual studio know what header files is supposed to be in the include folder and then make it create this when building, or should i manual maintain this folder? 有什么简单的方法可以使Visual Studio知道应该在include文件夹中包含哪些头文件,然后在构建时由头文件创建它,还是我应该手动维护此文件夹?

You could make your own macros in Visual Studio after a build. 构建后,您可以在Visual Studio创建自己的宏。 Check the post build event macros box in your project setting. 选中项目设置中的构建后事件宏框 You can also use a script language like PERL to handle the build and the post build events. 您还可以使用PERL类的脚本语言来处理构建和构建后事件。 I actually like the second method better as it gives more flexibility. 我实际上更喜欢第二种方法,因为它提供了更大的灵活性。

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

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