【转】Setting up SDL Extension Libraries on Windows
阅读原文时间:2023年07月09日阅读:2

FROM: http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/windows/index.php

Setting up SDL Extension Libraries on Windows

Last Updated 7/20/20

An important note for Microsoft Windows developers:

As part of your set up process, you are going to have to place the dll files 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:

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.

Also, if you are getting Procedure Entry Point could not be located in the dynamic link library errors, it could mean that that you have conflicting versions of the dll. Go into the windows command line, and use the "where" command by typing where *name of dll file*. The first file is the first dll windows finds and the one it uses when a program that needs that dll. You can then replace the old version with the new one SDL_image uses.

Select Your IDE/Compiler

Visual Studio 2019 Community Edition

Code::Blocks 12.11

Visual Studio.NET 2010 Ultimate

Command Line (MinGW)

Back

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器