-lSDL
当你遇到“undefined reference to sdl_main'”错误时,通常是因为链接器未能找到SDL库中的SDL_main`函数。以下是一些可能的解决步骤: 确定错误原因: 这个错误通常表明你的项目在链接阶段未能找到SDL库中的SDL_main函数。这可能是因为SDL库没有被正确链接到你的项目中,或者链接器设置不正确。 检查链接器设置: 确...
CMakeFiles\Test_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x65): undefined reference to `SDL_Quit' CMakeFiles\Test_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x72): undefined reference to `SDL_GetError' C:/Code/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3...
在Qt中使用SDL可能会出现下面错误error: undefined reference toqMain(int, char**)'` 这是因为我们在头文件中包含了SDL.h,这里面将main进行了替换,想要调用SDL_main 我们main.cpp中取消这个宏定义即可 #undefmain 如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎...
jni/../jni/sdl_main/SDL_android_main.cpp:37: error: undefined reference to 'SDL_main' clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/home/myuser/Android/Sdk/ndk/21.1.6352462/build/core/build-binary.mk:725: obj/local/armeabi-v7a/lib...
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...
SDL_Window* fenetre(0); SDL_GLContext contexteOpenGL(0); SDL_Event evenements; bool terminer(false); // Initialisation de la SDL if(SDL_Init(SDL_INIT_VIDEO) < 0) { std::cout << "Erreur lors de l'initialisation de la SDL : " << SDL_GetError() << std::endl; SDL_Quit(); ret...
未定义对‘SDL _Init’的引用,将SDL链接到程序 、 我第一次开始使用SDL库,我使用apt-get install将其下载到windows子系统(Ubuntu)上。当我调用SDL库中的函数,然后运行makefile时,我会看到: /home/display.c:13:undefinedreferenceto `SDL_Init'/
我把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....
我在使用SDL2的时候,遇到undefined reference to `SDL_Init'的问题,只要使用SDL2相关的函数,就会报函数未定义。后来百度到一篇文章https://blog.csdn.net/hank12580/article/details/45949995,经过测试可以使用,原来是编译的时候后面要加一些参数,具体我不知道是干啥的,至少给了我一个方向,我应该去看看SDL2相关的教...