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. RCTF 2019 web

    写在正文前 神仙题,压根不会. 听说跟着神仙的思路走一遍印象会深点,Just mo it .2333 正文 nextphp 整体思路:phpinfo得知存在preload.php文件,并与opcach ...

  2. 什么是Python???

    1.python是一种解释型语言,这就是说python不用像C语言或者C的衍生语言那样在执行前进行编译. 2.Python是一种动态类型的语言,就是python支持x = 111或者x="1 ...

  3. 每日一个知识点系列:volatile的可见性原理

    每日一个知识点系列的目的是针对某一个知识点进行概括性总结,可在一分钟内完成知识点的阅读理解,此处不涉及详细的原理性解读. img 看图说话 关键点1: 总线嗅探器(MESI 缓存一致性原理 ) 关键点 ...

  4. mysql存储过程的初步学习及案例示例

    存储过程 几个月前小编开始初步接触学习存储过程,当然是跟着大神的视频学习的,在学习的过程中自己也记录了一下笔记,如今整理一下,接下来我将从概念,优缺点以及语法和实际应用几方面为大家详细讲解一下存储过程 ...

  5. 【PowerQuery】做了一万遍的工资条

    前面已经了解了Excel.VBA.Python实现工资条,今天尝试用PQ做一遍 做之前迷惑了很久,如何能自定义长度 Table有Repeat函数,但是List没有.看来另外想办法 一步步接近目标  请 ...

  6. Spring一些笔记

    @ControllerAdvice ,被注解的class表示这是一个增强的 Controller. 使用这个 Controller ,可以实现三个方面的功能: 全局异常处理 全局数据绑定 全局数据预处 ...

  7. Solidity智能合约面向对象编程(一、类的创建)

    Solidity编写智能合约 1 pragma solidity ^0.4.4;//版本声明 ^代表向上兼容 pragma代表版本声明 solidity 代表开发语言 2 //定义类 3 contra ...

  8. Arduino 串口库函数

    库函数目录 if (Serial) available() availableForWrite() begin() end() find() findUntil() flush() parseFloa ...

  9. 小试牛刀-hello,world!(第一个程序)

    1.打开python的IDLE,启动Python解释器(按键盘的windows键,然后输入IDLE),在提示符下>>>输入命令:print("hello,world!&qu ...

  10. 2016年 实验五 Internet与网络工具的使用

    实验五 Internet与网络工具的使用 [实验目的] 本实验目的在于掌握 Telnet.FTP.Email的工作机理,并会在 Internet 上熟练使用相关工具软件. [实验条件] ⑴.个人计算机 ...