-- main.cpp
#include <SDL3/SDL.h>
int main(int argc, char* argv[]) {
SDL_Log("Hello World!");
return 0;
}
-- tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o", "${fileDirname}\\Hello.exe",
"-I", "${workspaceFolder}/include",
"-L", "${workspaceFolder}/lib",
"-lSDL3",
"-mwindows"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
-- c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.26100.0",
"compilerPath": "C:/MinGW/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}
SDL 3.4.0 연결하려는데 자꾸 오류납니다 뭐가 문제인 걸까요
오류는 undefined reference to `SDL_Log' 라 해요 include 문제는 아닌 거 같고 .a 문제인 거 같은데 (아닐 수도 있음)
vscode 세팅 넘 어렵네요구르트 (코딩 갓 입문인)
링커에 sdl라이브러리 추가
하하 컴파일러가 32비트엿네요
빌드툴 써라