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. C语言实现数据结构的邻接矩阵----数组生成矩阵、打印、深度优先遍历和广度优先遍历

    写在前面 图的存储结构有两种:一种是基于二维数组的邻接矩阵表示法. 另一种是基于链表的的邻接表表示法. 在邻接矩阵中,可以如下表示顶点和边连接关系: 说明: 将顶点对应为下标,根据横纵坐标将矩阵中的某 ...

  2. 2020 CiGA Game Jam活动总结

    CiGA Game Jam 总结 今年8月14.15.16号,48小时游戏开发--Game Jam开始了.蠢新第一次参加Game Jam,今年还是线上开展,情绪复杂= = 还有一个坏消息,晓航旅游缺席 ...

  3. 结合 Shell 对 Koa 应用运行环境检查

    在开发环境中,启动一个koa 应用服务,通常还需要同时启动数据库.比如.Mongodb.mysql 等 如果一直开着数据库服务,在不使用的话,电脑会占一定的性能.然而如果每次手动去启动服务,效率又不高 ...

  4. Hbuilder给手机发送短信与拨打电话

    前言:业务场景 需要给手机号码拨打电话与发送短信.html5已经提供接口. methods: { Call: function() { var that = this; if(that.ptel == ...

  5. 028 01 Android 零基础入门 01 Java基础语法 03 Java运算符 08 逻辑“或”运算符

    028 01 Android 零基础入门 01 Java基础语法 03 Java运算符 08 逻辑"或"运算符 本文知识点:Java中的逻辑"或"运算符 逻辑& ...

  6. IO那些事

    IO(Input\Output): 即输入输出,通常指数据在存储器(内部和外部)或其他周边设备之间的输入和输出,是信息处理系统(例如计算机)与外部世界(可能是人类或另一信息处理系统)之间的通信.说的简 ...

  7. JS判断PC操作系统版本

    var version = navigator.userAgent; console.log(version); //"Mozilla/5.0 (Windows NT 10.0; WOW64 ...

  8. GUI版本的emacs

    概要 emacs 配置 X11 配置 输入法配置 spacemacs 中的配置 fcitx 汉字显示方块的问题 总结 优势 劣势 概要 之前一直使用 terminal 版本的 emacs, 性能和显示 ...

  9. 阿里百秀后台管理项目笔记 ---- Day01

    摘要 在此记录一下阿里百秀项目的教学视频的学习笔记,部分页面被我修改了,某些页面效果会不一样,基本操作是一致的,好记性不如烂笔头,加油叭!!! step 1 : 整合全部静态页面 将静态页面全部拷贝到 ...

  10. unix socket接口

    socket 创建套接字文件: #include <sys/socket.h> // 成功返回非负套接字描述符,失败返回-1 int socket(int domain, int type ...