简体   繁体   English

Visual Express:SDL_Image未定义

[英]Visual Express : SDL_Image is undefined

I just installed SDL_Image for use in my Visual Studio. 我刚刚安装了SDL_Image以便在Visual Studio中使用。 And I keep getting any command related to SDL_Image as undefined. 而且,我一直在获取与SDL_Image相关的任何命令,均未定义。 I have been following this tutorial 我一直在关注本教程

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

And according to the tutorial, it is Step 11 that is the cause. 根据该教程,这是步骤11造成的。 I have compared the tutorial's version to my own 我已经将本教程的版本与自己的版本进行了比较

SDL2.lib
SDL2main.lib
SDL2_image.lib

And apart from the lack of SDL2_ttf.lib and SDL2_mixer.lib, I can't see a real difference that would effect it. 除了缺少SDL2_ttf.lib和SDL2_mixer.lib外,我看不到会影响它的真正差异。 I have checked that my .dlls are in the correct place and from the correct .zips and folders. 我已经检查过我的.dll放在正确的位置,并且来自正确的.zips和文件夹。 I can't see anything else that would cause the problem. 我看不到其他会导致问题的原因。 Perhaps I missed something. 也许我错过了一些东西。 What else can produce the " _ is undefined" error? 还有什么会产生“ _ is undefined”错误?

I have just checked the tutorial again and made sure that the tutorial has been followed correctly. 我刚刚再次检查了该教程,并确保已正确遵循该教程。

This issue usually happens when you incorrectly set the include path in your project properties, adjust it so the path is similar to this : C:\\\\SDL\\include 当您错误地在项目属性中设置包含路径,并对其进行调整以使该路径类似于以下路径时,通常会发生此问题:C:\\\\ SDL \\ include

If the issue still persists, try seeing if the linker libs path is incorrect. 如果问题仍然存在,请尝试查看链接器库路径是否错误。

comment your progress and ill edit my answer accordingly 评论您的进度,不适当地编辑我的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM