当你遇到“undefined reference to sdl_main'”错误时,通常是因为链接器未能找到SDL库中的SDL_main`函数。以下是一些可能的解决步骤: 确定错误原因: 这个错误通常表明你的项目在链接阶段未能找到SDL库中的SDL_main函数。这可能是因为SDL库没有被正确链接到你的项目中,或者链接器设置不正确。 检查链接器设置: 确...
-lSDL
我在使用SDL2的时候,遇到undefined reference to `SDL_Init'的问题,只要使用SDL2相关的函数,就会报函数未定义。后来百度到一篇文章https://blog.csdn.net/hank12580/article/details/45949995,经过测试可以使用,原来是编译的时候后面要加一些参数,具体我不知道是干啥的,至少给了我一个方向,我应该去看看SDL2相关的教...
jni/../jni/sdl_main/sdl_main.c:138: error: undefined reference to 'SDL_main' jni/../jni/sdl_main/sdl_main.c:58: error: undefined reference to 'SDL_main' jni/../jni/sdl_main/SDL_android_main.cpp:37: error: undefined reference to 'SDL_main' pelya commented Maybe it's because of...
我把x86_64-w64-mingw32/lib 下的libSDL2main.a和libSDL2.a解压了出来。也设定了include 和 link的路径。-lmingw32 -lSDL2main -lSDL2 也添加了。但是悲剧的undefined reference to `SDL_Init'xxxxxx求解。。我上传了 我的工程文件 及SDL2-devel-2.0.4-mingw.tar.gz(官网下载略慢)地址http://pan....
Hello, I try to build pc_simulator project, but I get follow 19 errors, what do I wrong??: Description Resource Path Location Type undefined reference to SDL_CreateRenderer' monitor.c /pc_simulator/lv_drivers/display line 211 C/C++ Problem undefined reference to SDL_CreateTexture' monitor.c...
(GLWindow aurait été plus logique) qui regrouperait le contexte, et la fenêtre. Mais, je réalise un appel du constructeur de la classe SDL::Window dans SDL::WindowGL car cette dernière hérite publiquement de SDL::Window, or cet appel me renvoie l'erreur "undefined reference to `...
SDL_image undefined reference to `IID_IDirectDrawSurface3' SDL_dx5video.c:(.text+0x191): undefined reference to `IID_IDirectDrawSurface3' SDL_
在Qt中使用SDL可能会出现下面错误error: undefined reference toqMain(int, char**)'` 这是因为我们在头文件中包含了SDL.h,这里面将main进行了替换,想要调用SDL_main 我们main.cpp中取消这个宏定义即可 #undefmain 如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎...
Went to my laptop (running Lubuntu) to see if it has the same issues. image image 2 (using renderer example 01-clear) Yes, you're missing the step of linking the SDL library into your final executable, seehereon how to do that on Linux: ...