简体   繁体   English

如何在Visual Studio 2013中本地使用SDL

[英]How to use SDL locally in Visual Studio 2013

I want to add SDL and SDL_image to my Visual Studio project. 我想将SDL和SDL_image添加到我的Visual Studio项目中。 But can I do it locally only for this project? 但是我只能在本地为这个项目做吗? I don't want to put the dlls in System32 folder. 我不想将dll放在System32文件夹中。

An easy way is to copy them either manually into your output folder or to create a post build event. 一种简单的方法是将它们手动复制到您的输出文件夹中,或者创建一个构建后事件。

Use Microsoft link to see where you can put your Dlls without conflicting with System32: https://msdn.microsoft.com/en-us/library/7d83bc18.aspx 使用Microsoft链接查看可以在哪里放置Dll而不与System32冲突: https : //msdn.microsoft.com/zh-cn/library/7d83bc18.aspx

As described by Ciprian Khlud , you could simply put your DLLs next to the output binary (.exe). Ciprian Khlud所述 ,您可以将DLL放在输出二进制文件(.exe)旁边。 You could find output directory in 您可以在以下位置找到输出目录

Right click on project -> Project Settings -> General -> Output Directory

Alternatively, you could add the folder where DLLs are into the list of search directories: 或者,您可以将DLL所在的文件夹添加到搜索目录列表中:

Right click on project -> Project Settings -> VC++ Directories -> Executable Directories

(same way as you add include dirs and library dirs) (与添加包括目录和库目录的方式相同)

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

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