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

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的更多相关文章

  1. 【转】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 ...

  2. 【转】Setting up SDL Extension Libraries on Windows

    FROM: http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/window ...

  3. 【转】Setting up SDL Extension Libraries on MinGW

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

  4. 【转】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 ...

  5. 【转】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 ...

  6. Making every developer more productive with Visual Studio 2019

    Today, in the Microsoft Connect(); 2018 keynote, Scott Guthrie announced the availability of Visual ...

  7. Visual Studio 2019 for Mac 离线更新方法

    当你打开Visual Studio 2019 for Mac检查更新时,如果下载更新包很慢,可以尝试如下操作: 打开Finder(访达),找到~/Library/Caches/VisualStudio ...

  8. Visual Studio 2019 发布活动 - 2019 年 4 月 2 日

    Visual Studio 2019 发布活动 2019 年 4 月 2 日,星期二 | 上午 9:00 (PT) 围观: https://visualstudio.microsoft.com/zh- ...

  9. Visual Studio 2019 正式发布,重磅更新,支持live share

    如约而至,微软已于今天推出 Visual Studio 2019 正式版,一同发布的还有 Visual Studio 2019 for Mac. Visual Studio 2019 下载地址:htt ...

随机推荐

  1. Azure Storage 系列(六)使用Azure Queue Storage

    一,引言 在之前介绍到 Azure Storage 第一篇文章中就有介绍到 Azure Storage 是 Azure 上提供的一项存储服务,Azure 存储包括 对象.文件.磁盘.队列和表存储.这里 ...

  2. (转)ServletConfig与ServletContext

    出处:http://blog.csdn.net/cl05300629/article/details/9362601 作者:伫望碧落 一.Servlet配置对象(ServletConfig):Serv ...

  3. Spring源码系列(四)--spring-aop是如何设计的

    简介 spring-aop 用于生成动态代理类(底层是使用 JDK 动态代理或 cglib 来生成代理类),搭配 spring-bean 一起使用,可以使 AOP 更加解耦.方便.在实际项目中,spr ...

  4. 基于GAN的特征抽取 Feature Extraction by GAN

    InfoGAN 期望的是 input 的每一个维度都能表示输出数据的某种特征.但实际改变输入的一个特定维度取值,很难发现输出数据随之改变的规律. InfoGAN 就是想解决这个问题.在 GAN 结构以 ...

  5. 025 01 Android 零基础入门 01 Java基础语法 03 Java运算符 05 if条件结构

    025 01 Android 零基础入门 01 Java基础语法 03 Java运算符 05 if条件结构 本文知识点:Java中的if条件结构语句 关系运算符回顾 生活中根据条件进行判断采取不同操作 ...

  6. c++ 在window下创建窗口的基本步骤

    1. WinMain 函数的定义: 2. 创建一个窗口 2.1 设计一个窗口类 WNDCLASS 2.2 注册窗口类 2.3 创建窗口 2.4 显示及更新窗口 3. 进行消息循环 BOOL GetMe ...

  7. Arduino的外部中断

    Arduino的中断函数格式为attachInterrupt(interrput,function,mode). attachInterrupt函数用于设置外部中断,有3个参数,interrput表示 ...

  8. PyCharm 上安装 Package(以 pandas 为例)

    一.使用 PyCharm 软件安装 pandas 包 1.打开 PyCharm 2.点击右上角 "Files" →"Settings..." 3.弹出" ...

  9. cmd备份数据库,还原数据库,仅限于php

    第一:先备份数据库 1.进入cmd(黑盒子) 2.进入phpstudy所在的盘 3.cd E: 3.cd phpstudy; 4.cd PHPTutorial 5.cd mysql; 6.cd bin ...

  10. 回炉重造系列-C# func and action委托是什么?

    如题: C# func and action委托是什么? 1) 回答这个问题之前,我们需要了解什么是委托(英文 Delegate )? 为了便于理解,再往前推一步,回到c语言时代,指针的概念. 什么是 ...