- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
过去几个月我一直在使用 sdl 1.2(在 Windows 上)。我正在考虑迁移到 1.3。所以我使用 cmake 和代码块来创建静态和动态库。现在我很困惑如何编译程序。我包含了 sdl.h 头文件。在链接器中添加了静态库。但是当我尝试编译很多未定义的错误不断发生:
D:\using font\sdl_2test\main.c||In function 'SDL_main':|
D:\using font\sdl_2test\main.c|9|warning: passing argument 6 of 'SDL_CreateWindow' makes integer from pointer without a cast|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\include\SDL_video.h|405|note: expected 'Uint32' but argument is of type 'void *'|
D:\using font\sdl_2test\main.c|11|warning: control reaches end of non-void function|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsmodes.c.obj)||In function `WIN_GetDisplayMode':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|62|undefined reference to `CreateDCW@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|71|undefined reference to `CreateCompatibleBitmap@12'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|72|undefined reference to `GetDIBits@28'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|73|undefined reference to `GetDIBits@28'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|74|undefined reference to `DeleteObject@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|75|undefined reference to `DeleteDC@4'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowswindow.c.obj)||In function `WIN_GetWindowGammaRamp':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|530|undefined reference to `CreateDCW@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|532|undefined reference to `GetDeviceGammaRamp@8'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|536|undefined reference to `DeleteDC@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|536|undefined reference to `DeleteDC@4'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowswindow.c.obj)||In function `WIN_SetWindowGammaRamp':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|511|undefined reference to `CreateDCW@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|513|undefined reference to `SetDeviceGammaRamp@8'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|517|undefined reference to `DeleteDC@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|517|undefined reference to `DeleteDC@4'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsframebuffer.c.obj)||In function `WIN_DestroyWindowFramebuffer':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|114|undefined reference to `DeleteDC@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|118|undefined reference to `DeleteObject@4'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsframebuffer.c.obj)||In function `WIN_UpdateWindowFramebuffer':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|100|undefined reference to `BitBlt@36'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsframebuffer.c.obj)||In function `WIN_CreateWindowFramebuffer':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|36|undefined reference to `DeleteDC@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|39|undefined reference to `DeleteObject@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|50|undefined reference to `CreateCompatibleBitmap@12'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|51|undefined reference to `GetDIBits@28'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|52|undefined reference to `GetDIBits@28'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|53|undefined reference to `DeleteObject@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|83|undefined reference to `CreateCompatibleDC@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|84|undefined reference to `CreateDIBSection@24'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|91|undefined reference to `SelectObject@8'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsshape.c.obj)||In function `CombineRectRegions':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsshape.c|53|undefined reference to `CreateRectRgn@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsshape.c|55|undefined reference to `CombineRgn@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsshape.c|56|undefined reference to `DeleteObject@4'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsopengl.c.obj)||In function `WIN_GL_SwapWindow':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|668|undefined reference to `SwapBuffers@4'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsopengl.c.obj)||In function `WIN_GL_ChoosePixelFormatARB':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|399|undefined reference to `ChoosePixelFormat@8'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|399|undefined reference to `SetPixelFormat@12'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsopengl.c.obj)||In function `WIN_GL_SetupWindow':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|518|undefined reference to `SetPixelFormat@12'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowsopengl.c.obj)||In function `WIN_GL_ChoosePixelFormat':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|206|undefined reference to `DescribePixelFormat@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|210|undefined reference to `DescribePixelFormat@16'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowskeyboard.c.obj)||In function `IPPASink_QueryInterface@12':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|1117|undefined reference to `IID_IUnknown'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowskeyboard.c.obj)||In function `UIElementSink_QueryInterface@12':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|1011|undefined reference to `IID_IUnknown'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowskeyboard.c.obj)||In function `IME_SetupAPI':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|613|undefined reference to `ImmGetIMEFileNameA@12'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|626|undefined reference to `ImmGetContext@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|629|undefined reference to `ImmReleaseContext@8'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowskeyboard.c.obj)||In function `IME_ClearComposition':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|679|undefined reference to `ImmGetContext@4'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|683|undefined reference to `ImmNotifyIME@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|687|undefined reference to `ImmNotifyIME@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|688|undefined reference to `ImmReleaseContext@8'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|685|undefined reference to `ImmSetCompositionStringW@24'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowskeyboard.c.obj)||In function `IME_GetCompositionString':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|695|undefined reference to `ImmGetCompositionStringW@16'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|700|undefined reference to `ImmGetCompositionStringW@16'|
..\..\GameDev\SDL_2\static\libSDL2.a(SDL_windowskeyboard.c.obj)||In function `IME_GetId':|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|547|undefined reference to `ImmGetIMEFileNameA@12'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|562|undefined reference to `GetFileVersionInfoSizeA@8'|
D:\GameDev\SDL-2.0\SDL-2.0.0-6799\src\video\windows\SDL_windowskeyboard.c|566|undefined reference to `GetFileVersionInfoA@16'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 2 warnings ===|
最佳答案
我也在寻找这个问题的答案,因为我找不到,这对我有用:
如果使用 mingw 作为编译器,则必须按此顺序链接到以下库:
-lmingw32 -lSDL2main -lSDL2 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid
关于mingw - SDL 1.3/2.0 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14318447/
我已经开始使用 MinGW/MSYS 试图在 Windows 上使用一些 Linux 库。使用 ./configure --prefix=/mingw make make install 到目前为止运
Mingw.org显然还没有完全死掉,但最新的版本是 gcc 4.5.2,而 4.6 已经是老新闻了。 有谁知道我在哪里可以获得 mingw-gcc 4.6+?是 mingw-w64更活跃?他们似乎也
假设我有三个 C 源文件。前两个是 LIB(lib*.a?),第三个是使用它们的应用程序。 第一个是(re.c): int re(int i) { return i; } 第二个是(test.
MinGW、MinGW-w64和MinGW-builds有什么区别? 我应该使用哪一个在 Windows 8 机器上使用 Eclipse IDE 编译 c++ 11 源代码? 最佳答案 MinGW 是
至少从2021-01-10T15:19:40Z起,我无法访问www.mingw.org。 据我所知,这是mingw官方网页。 有人知道www.mingw.org的状态吗?或者,还有其他套房问这个问题吗
MinGW 有什么区别项目和 32-bit portion MinGW-w64的项目? MinGW-w64 的 32 位部分与 x64 有任何关系吗? 看起来他们的编译器做了完全相同的事情......
我想在 Windows 中有一个 POSIX 环境(用作系统 shell ),同时生成 native Windows 可执行文件。过去的一种选择是安装 Cygwin 和 MinGW,并可能从 Cygw
Qt 和 Code blocks 下载包都有自己的 MinGW 编译器。还有独立的 MinGW 本身。它们之间有什么区别吗? 我可以使用 Qt 的 MinGW 来构建代码块项目,反之亦然吗? 如果我想
我已经通过网络安装程序安装了 msysgit。我最终得到了将近 2 GB 的资料,其中包括 git 源和 MinGW。 我有三个问题 我已经从 MinGW.org 获得了 MinGW。现在我想我可以删
我终于设置了 mingw 和 msys,现在我想编译 libjpeg。我从 projekt 页面 (jpeg-8d) 下载了最新的 libjpeg 源并提取了文件。 然后我像这样运行配置命令: ./c
我喜欢 vcpkg 的想法,但我想我更愿意坚持使用 MinGW 作为我的编译器。 我找不到关于我是否可以设置(或如何设置)vcpkg 以便它为 MinGW 而不是 MSVC 编译包的任何资源。如果可能
我将在 Windows 中使用 NetCDF,我认为它必须使用 MinGW 编译,因为我的主程序和所有其他库已经使用 MinGW 编译。 但是当我使用 MinGW(gcc 版本 4.6.2)时。我收到
我正在尝试设置 MinGW。我已经下载了最新的安装程序,它安装了 mingw-get,但该实用程序无法获取软件包并提供以下类型的消息: mingw-get: * ERROR * Get package
我想使用 mingw-get-inst-20120421.exe 从 Sourceforge 下载 MinGW C 和 C++ gnu 编译器。它让我可以选择下载预先打包的存储库或最新的存储库。当我在
我刚刚按照 this post 设置了 MinGW 环境 但是如何向其中添加 3rd 方库? 最佳答案 库由两个主要组件组成——C 头文件和编译后的目标代码存档。 GCC 有一系列令人眼花缭乱的方法来
我不断收到错误: fatal error: mpi.h: No such file or directory 如何将 mpi.h 作为默认库包含在内?我相信我已经将 c:\MPICH2\bin 放在
看我有这样的代码 #include #include #include void* thread_function(void) { printf ("This is thread %d \n",p
如何使用 Mingw 在 Windows 中为源目录应用补丁文件? 最佳答案 使用mingw-get获取msys补丁 mingw-get install msys-patch 然后像unix一样使用p
我正在尝试使用来自 http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%
我刚刚在 Windows 上安装了 MinGW,但无法像在 Linux 甚至 PuTTY 上那样进行复制/粘贴。将文本(例如从 chrome)复制并粘贴到 MinGW shell 中的技巧是什么? 最
我是一名优秀的程序员,十分优秀!