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. 用Docker swarm快速部署Nebula Graph集群

    用Docker swarm快速部署Nebula Graph集群 一.前言 本文介绍如何使用 Docker Swarm 来部署 Nebula Graph 集群. 二.nebula集群搭建 2.1 环境准 ...

  2. Kafka处理请求的全流程分析

    大家好,我是 yes. 这是我的第三篇Kafka源码分析文章,前两篇讲了日志段的读写和二分算法在kafka索引上的应用 今天来讲讲 Kafka Broker端处理请求的全流程,剖析下底层的网络通信是如 ...

  3. SpringBoot2.3中@Async实现异步

    启动加上@EnableAsync ,需要执行异步方法上加入@Async. 在方法上加上@Async之后 底层使用多线程技术. 不使用异步 先关代码: package com.yiyang.myfirs ...

  4. Win10系统下的MySQL5.7.24版本(解压版)详细安装教程

    进入MySQL官网下载压缩包 MySQL官网:https://www.mysql.com/ 将页面拉到最底,点击MySQL Community Server 跳转到下载页面,默认选择是最新版MySQL ...

  5. 引用类型之Array(一)

    Array类型 除了Object之外,Array类型在ECMAScript中也很常用.ECMAScript中的数组与其他多数语言中的数组有着相当大的区别.ECMAScript数组的每一项可以保存任何类 ...

  6. 使用响应扩展的响应面(Rx)

    下载demo - 196 KB 下载source - 98 KB 表的内容 系统要求反应面一个简单的计时器从事件中收集数据序列使用更复杂的查询订阅您希望完成的面最终考虑历史 介绍 "Rx&q ...

  7. 解决mybatis-plus更新数据的时候,有值为空导致更新失败的问题

    问题 在用mybatis-plus更新数据的时候,更新失败,错误信息如下: Cause: org.apache.ibatis.type.TypeException: Could not set par ...

  8. Springboot应用使用Docker部署

    首先准备好springboot应用,然后打包,我这里已经准备好了一个jar包 然后上传到服务器,准备一个目录用于存放jar包和Dokerfile文件 编写Dokerfile文件 我这里写的很简单,就简 ...

  9. 两个多维高斯分布之间的KL散度推导

    在深度学习中,我们通常对模型进行抽样并计算与真实样本之间的损失,来估计模型分布与真实分布之间的差异.并且损失可以定义得很简单,比如二范数即可.但是对于已知参数的两个确定分布之间的差异,我们就要通过推导 ...

  10. 帮你解读什么是Redis缓存穿透和缓存雪崩(包含解决方案)

    一.缓存处理流程 前台请求,后台先从缓存中取数据,取到直接返回结果,取不到时从数据库中取,数据库取到更新缓存,并返回结果,数据库也没取到,那直接返回空结果. 二.缓存穿透 描述: 缓存穿透是指缓存和数 ...