【转】Setting up SDL on Windows

FROM: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/index.php

Setting up SDL on Windows

Last Updated 7/29/20

An important note for Microsoft Windows developers:

As part of your set up process, you are going to have to place the dll file some place where your program can link with it during runtime. You can either put the dll file in the same directory as your executable, or put it in the system directory. C:\WINDOWS\SYSTEM32 is the 32bit windows system directory and C:\Windows\SysWOW64 is the 64bit system directory of 32bit applications.

The advantages of placing the dll file in the system directory are:

  1. Your operating system will always be able to find the library on your system, so you can compile and run dynamically linked applications anywhere on your system
  2. You won't have to place a copy of the dll file with every single application you develop

With that in mind, when distributing your application you should never mess with the user's system directory. The user could have applications that require SDL version ABC in the system directory and you could be overwriting it with SDL version XYZ. Your distribution version should have the dll files in the same directory as the executable.

Select Your IDE/Compiler
【转】Setting up SDL on Windows Visual Studio 2019 Community Edition
【转】Setting up SDL on Windows Code::Blocks 12.11
【转】Setting up SDL on Windows Visual Studio.NET 2010 Ultimate
【转】Setting up SDL on Windows Command Line (MinGW)
Back
上一篇:今天Windows Azure Live to Code的分享


下一篇:SQL Server 2012安装错误案例:Error while enabling Windows feature: NetFx3, Error Code: -2146498298