SDL 损坏的 .drectve
SDL corrupt .drectve
我刚刚安装了 SDL,它给了我一个警告,阻止它编译。
这是构建日志:
-------------- Build: Debug in Graphics (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -LC:\Users638G75MA\Documents\SDL2-2.0.3\lib\x86 -o bin\Debug\Graphics.exe obj\Debug\main.o -lmingw32 -lSDL2main -lSDL2
C:\Users638G75MA\Documents\SDL2-2.0.3\lib\x86/SDL2main.lib(./Release/SDL_windows_main.obj):(.text[_main]+0x0): multiple definition of `main'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../libmingw32.a(main.o):(.text.startup+0x0): first defined here
Warning: corrupt .drectve at end of def file
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))
和代码:
#include <iostream>
#include <SDL.h>
using namespace std;
int main(int argc, char *argv[]){
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}
我链接到错误的 SDL\include 和 SDL\bin,链接到 x64 而不是 x86
我刚刚安装了 SDL,它给了我一个警告,阻止它编译。
这是构建日志:
-------------- Build: Debug in Graphics (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -LC:\Users638G75MA\Documents\SDL2-2.0.3\lib\x86 -o bin\Debug\Graphics.exe obj\Debug\main.o -lmingw32 -lSDL2main -lSDL2
C:\Users638G75MA\Documents\SDL2-2.0.3\lib\x86/SDL2main.lib(./Release/SDL_windows_main.obj):(.text[_main]+0x0): multiple definition of `main'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../libmingw32.a(main.o):(.text.startup+0x0): first defined here
Warning: corrupt .drectve at end of def file
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))
和代码:
#include <iostream>
#include <SDL.h>
using namespace std;
int main(int argc, char *argv[]){
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}
我链接到错误的 SDL\include 和 SDL\bin,链接到 x64 而不是 x86