C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/msys32/mingw32/lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x774): undefined reference to `ImmSetCompositionStringW@24' C:/msys32/mingw32/bin/../lib/gcc/i686-w64...
这是Debug配置环境下的内容 D:\sdk\SDL\build\Debug\SDL2-staticd.libwinmm.lib version.libImm32.lib Setupapi.lib libcmt.lib libucrtd.lib 这是Release配置环境下的内容 D:\sdk\SDL\build\Release\SDL2-static.libwinmm.libversion.libImm32.libSetupapi.liblibcmt.liblibucrtd.lib 3. 把预处理器中的_...
运行${prefix}/bin/sdl-config --static-libs --cflags --libs可以获得 -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 ...
之后,使用Visual Studio创建一个C++空项目,并在项目中添加main.cpp文件。在工程属性对话框中,配置头文件搜索路径为包括SDL和其他库的目录。在Debug和Release配置下,设置连接器的附加依赖项,包括SDL2-staticd.lib、winmm.lib、version.lib等库。确保删除预处理器中的_CONSOLE标志,并将连接器子系统设置...
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") endif () set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) #自己添加的hidapi ,把它添加到里面编译 ...
If you run with some projects that use dynamic-link and some other which use static-link, you will have to keep your librairies in two different folders knowing that "libSDL2main.a" will be in those two. Sorry for my writing, I'm not used to write in english. ...
add_library(SDL2 STATIC IMPORTED) set_target_properties(SDL2 PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jni/SDL2/lib/${ANDROID_ABI}/libSDL2.a) add_library(native-lib SHARED src/main/cpp/native-lib.cpp) find_library(log-lib log) ...
lib, "../SDL2-2.0.3/lib/x86/SDL2.lib")#define WINDOW_W 640#define WINDOW_H 480#define NUM_SPRITES 100#define MAX_SPEED 1static SDL_Window* window;static SDL_Renderer *renderer;static SDL_Texture * sprite;static int window_w, window_h;static int sprite_w, sprite_h;static SDL...
2. 3. 4. 5. 6. 1、搭建项目 使用android-project 作为一个模板搭建一个项目,必须包名一致(SDLActivity 里声明了native方法,如果包名不一致,本地方法与jni层的映射的方法对应不上,会报错,可以修改,不过先别管这么多,先跑起来再说) 1、新建一个项目,包名取org.libsdl.app ...
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") endif () set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) #自己添加的hidapi ,把它添加到里面编译 if(ANDROID) target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS} hidapi) ...