【转】Setting up SDL Extension Libraries on Visual Studio 2019 Community
Setting up SDL Extension Libraries on Visual Studio 2019 Community
Last Updated 7/20/20
1)First thing you need to do is download SDL_image headers and binaries. You will find them on the SDL_image website, specifically on this page.
You'll want to download the Visual C++ development libraries.

Extact the folder to where ever you'd like. I recommend keeping your development libraries in the same directory so for this tutorial we will be extacting it to C:\vclib
2)Now go download the source for lesson 06. Add the source file to your existing SDL2 project and hit build. You should get the following error:
Cannot open include file: 'SDL_image.h': No such file or directory
Like before, this mean Visual C++ can't find the SDL_image headers, so make sure to add the SDL_image headers to your path:



3) Try and build again. You'll probably get the following error:
unresolved external symbol IMG_Init referenced in function "bool __cdecl init(void)" (?init@@YA_NXZ)
Again, this means Visual Studio does not know it needs to use the SDL_image library, so go add it to your dependencies:


4)Build again and you'll get this error:
cannot open file 'SDL2_image.lib'
This is Visual C++ complaining that it can't find the SDL_image library file, so let's add it to library directories. Again, make sure you pick the library that matches your build configuration (for this tutorial we are using the Debug x64 configuration):


5)Build one more time and it should compile, but if you try to run you'll get this error:
The code execution cannot proceed because SDL2_image.dll was not found.
This is Windows complaining that it can't find SDL2_image.dll along with the other SDL2_image dlls. Let's add it to the path environment variable like we did for SDL



6)Restart Visual C++ so it can get the updated path variable, and the application should run.
Now that you have the extension library compiling, it's time to go onto part 2 of the tutorial.
Extension Libraries and Loading Other Image Formats Part 2: Loading PNGs with SDL_image
【转】Setting up SDL Extension Libraries on Visual Studio 2019 Community的更多相关文章
- 【转】Setting up SDL Extension Libraries on Visual Studio 2010 Ultimate
FROM:http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/windows ...
- 【转】Setting up SDL Extension Libraries on Windows
FROM: http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/window ...
- 【转】Setting up SDL Extension Libraries on MinGW
FROM:http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/windows ...
- 【转】Setting up SDL Extension Libraries on Code::Blocks 12.11
FROM: http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/window ...
- 【转】Setting up SDL 2 on Visual Studio 2019 Community
FROM: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/msvc2019/index.php Setting up SDL 2 on V ...
- Making every developer more productive with Visual Studio 2019
Today, in the Microsoft Connect(); 2018 keynote, Scott Guthrie announced the availability of Visual ...
- Visual Studio 2019 for Mac 离线更新方法
当你打开Visual Studio 2019 for Mac检查更新时,如果下载更新包很慢,可以尝试如下操作: 打开Finder(访达),找到~/Library/Caches/VisualStudio ...
- Visual Studio 2019 发布活动 - 2019 年 4 月 2 日
Visual Studio 2019 发布活动 2019 年 4 月 2 日,星期二 | 上午 9:00 (PT) 围观: https://visualstudio.microsoft.com/zh- ...
- Visual Studio 2019 正式发布,重磅更新,支持live share
如约而至,微软已于今天推出 Visual Studio 2019 正式版,一同发布的还有 Visual Studio 2019 for Mac. Visual Studio 2019 下载地址:htt ...
随机推荐
- SSM框架整合 IDEA_Maven
首先是配置web的web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app versio ...
- 报错: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
你没打开 1.双击打开 2.点击:
- Win10安装Ubuntu子系统
相信我,这是最后一次折腾系统了qaq,以后一定开始认真用Linux编程 跟的一个博客安装,传送门:Win10安装Ubuntu子系统及图形化界面详细教程 文章是2019的,加上我装的是Ubuntu 20 ...
- 永久改变cmd背景颜色
问题描述:cmd窗口为白底黑字,用久之后想换背景颜色. 解决方法一: win+R 输入regedis进入注册表,找到 HKEY_CURRENT_USER\Software\Microsoft\Comm ...
- springmvc 源码分析(一)-- DisparcherServlet的创建和注册到tomcat
一. servlet 3.0 的使用 1.1 环境搭建: servlet跟spring没有任何关系,我创建一个servlet可以不依赖spring,现在搭建一个纯的servlet项目,并实现简单的类似 ...
- Servlet3.x部署描述符
简介 web.xml即部署描述符,位于WEB-INF目录下.在Servlet3以上版本有提供了注解的方式部署Servlet,因此web.xml是可选的.web.xml大概框架如下: <?xml ...
- Python-语法糖(装饰器)
什么是高阶函数? -- 把函数名当做参数传给另外一个函数,在另外一个函数中通过参数调用执行 #!/usr/bin/python3 __author__ = 'beimenchuixue' __blog ...
- mysql-5-aggregation
#2.分组函数 /* 分组函数/聚合函数:传入一组值,经过统计处理,得到一个输出值 sum, avg, max, min, count */ USE myemployees; #简单使用 SELECT ...
- python基础知识 变量 数据类型 if判断
cpu 内存 硬盘 操作系统 cpu:计算机的运算和计算中心,相当于人类的大脑 飞机 内存:暂时存储一些数据,临时加载数据和应用程序 4G 8G 16G 32G 速度快,高铁 断电即消失 造价高 硬盘 ...
- spring-boot-route(四)全局异常处理
在开发中,我们经常会使用try/catch块来捕获异常进行处理,如果有些代码中忘记捕获异常或者不可见的一些异常出现,就会响应给前端一些不友好的提示,这时候我们可以使用全局异常处理.这样就不用在代码中写 ...