ferejuicy.blogg.se

Visual studio code linux sdl
Visual studio code linux sdl









visual studio code linux sdl

From the SDL homepage - "Simple DirectMedia Layer is a cross-platform multimedia library designed to provide level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer." In addition to the SDL Homepage, you can also see the SDL Documentation Wiki for API documentation. When it is finished, press Ctrl+Shift+B to compile and get is the Simple DirectMedia Layer. SDL_FillRect(surface, &rec, SDL_MapRGB(surface->format, 10, 200, 120)) SDL_FillRect(surface, &rec, SDL_MapRGB(surface->format, 180, 10, 140)) Window = SDL_CreateWindow("SDL2 Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_SHOWN) The parameters in the main function cannot be omitted, or an error will be reported "preLaunchTask": "g++.exe build active file" "description": "Enable pretty-printing for gdb", Pay attention to change to your own MinGW directory Then copy and paste the code into the corresponding file, and directly upload the code. Then extract a file called SDL2.dll from the 509kb compressed package, copy the DLL to the project root directory, and create it in the root directory A main.c, as shown below: Vscode Directory: tasks.json, launch.json, C ﹐ CPP ﹐ properties.json. Vscode directory in the project root directory (don't forget the previous point of vscode), and create three JSON files in the. Then configure vscode, create a new project folder, create a new. If the 32-bit MinGW is the directory of MinGW installation \ i686-w64-mingw32, after copying, you will find that there is an SDL2 in the directory below, which indicates that the installation is completed: Select all these folders and copy them to the directory of MinGW installation \ x86 ʄ w64-mingw32. Open the x86 ʄ folder, which contains several folders (bin, include, lib, share): I am 64 bit MinGW, and I want the one starting with X86 ʄ. The two folders marked need to be placed in the installation directory of MinGW, not both of them need to be copied, just copy one corresponding to their own version of MinGW. Unzip tar.gz, which contains the following folders: The following tar is the part that needs to be installed by yourself. It's very simple.įirst to the official website: Download two things, as shown below:Ĭorresponding to my own platform download, I am win10 64 bit.ĥ09kb is used to put it into the project root directory after compilation. I heard it a long time ago, so I downloaded a plan to try it. Today, I think of a well-known graphics library called SDL. The day before yesterday, I wanted to find a graphic library to write a small tool, and I wanted to find a smaller graphic library, so I found ege(easy graphics engine), and spent some time to configure it on vscode, and wrote an article by the way.











Visual studio code linux sdl