sdl

SDL window does not show

别等时光非礼了梦想. 提交于 2019-11-28 10:19:28
This is my code: #include <iostream> #include <SDL2/SDL.h> int main(int argc, const char * argv[]) { SDL_Init(SDL_INIT_VIDEO); SDL_Window *_window; _window = SDL_CreateWindow("Game Engine", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 700, 500, SDL_WINDOW_RESIZABLE); SDL_Delay(20000); SDL_DestroyWindow(_window); SDL_Quit(); return 0; } Im working in Xcode. I've downloaded SDL2 and imported the library to the projects build phases. I've tested that the SDL2 works correctly. The problem is that window never shows up. I just get a "spinning-mac-wheel" and then the program quits after the delay

SDL2: LNK1561: entry point must be defined

你。 提交于 2019-11-28 07:34:56
I want to compile this code: #include <SDL.h> int main(int argc, char* argv[]) { return 0; } But it can't be linked: Error 1 error LNK1561: entry point must be defined There is some strange code in this library: http://hg.libsdl.org/SDL/file/75726efbf679/include/SDL_main.h #define main SDL_main Also I added SDL2.lib;SDL2main.lib to Project Settings => Linker => Input. What can I do to run this project? VS 2012 SP3, empty C++ project. 4pie0 According to this thread on Dream.In.Code: Right click on project name -> Properties -> Expand Linker tab -> System -> SubSystem: make sure that it is

SDL2.0 Alternative for SDL_Overlay

心不动则不痛 提交于 2019-11-28 06:01:49
So I've been trying to go through the following tutorial on ffmpeg: http://dranger.com/ffmpeg/tutorial02.html However, when I try to compile using gcc, I get the following output: root:/Users/mbrodeur/Downloads/HACKATHON CONTENT/Tutorials-> gcc -o tutorial02 tutorial02.c -lavutil -lavformat -lavcodec -lz -lavutil -lm -lswscale -D_THREAD_SAFE -lSDL2 tutorial02.c: In function ‘main’: tutorial02.c:41: error: ‘SDL_Overlay’ undeclared (first use in this function) tutorial02.c:41: error: (Each undeclared identifier is reported only once tutorial02.c:41: error: for each function it appears in.)

SDL 2 Undefined Reference to “WinMain@16” and several SDL functions

老子叫甜甜 提交于 2019-11-28 05:51:19
问题 I've just installed SDL 2 and I have some serious problems. This is my code: #include <SDL2\SDL.h> int main(int argc, char* argv[]){ SDL_Init( SDL_INIT_VIDEO ); SDL_Quit(); return 0; } I am unable to compile because I get the error described in the title: obj\Debug\main.o||In function SDL_main':| C:\Users\myuser\Desktop\test 2000\main.cpp|5|undefined reference to SDL_Init'| C:\Users\myuser\Desktop\test 2000\main.cpp|7|undefined reference to SDL_Quit'| c:\program files\codeblocks\mingw\bin\..

error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup, but this time it's NOT a Windows/Console problem!

浪尽此生 提交于 2019-11-28 05:02:35
So, the infamous error is back. The project is complaining that it can't find the main() method (that's what the error means, right). However I do have a main, and my project is a Console project, as it should be. It worked before, so I know it's not that. Also, the project has too many classes and files for me to post them all, so I will post any classes you need by request. It's a C++, OpenGL and SDL game on Visual Studio 2010. It's not a problem of any of the libraries, as it was working fine before it suddenly and inexplicably showed this linker error. EDIT: The main() method: int main(int

How do I use Qt and SDL together?

試著忘記壹切 提交于 2019-11-28 04:58:30
I am building a physics simulation engine and editor in Windows. I want to build the editor part using Qt and I want to run the engine using SDL with OpenGL. My first idea was to build the editor using only Qt and share as much code with the engine (the resource manager, the renderer, the maths). But, I would also like to be able to run the simulation inside the editor. This means I also have to share the simulation code which uses SDL threads. So, my question is this: Is there a way to have an the render OpenGL to a Qt window by using SDL? I have read on the web that it might be possible to

A function-definition is not allowed here before '{'

拈花ヽ惹草 提交于 2019-11-28 04:36:34
问题 i am getting a REALLY annoying error. i literally looked everywhere for it! i even went back and changed all of my if (case) // to-do to if (case) { // to-do } i don't ask a lot of questions like this, but i am really getting frustrated, and i am almost positive it is something simple that i am not seeing. here is the error: entity.cpp: In member function ‘virtual void Entity::clean()’: entity.cpp:148: error: a function-definition is not allowed here before ‘{’ token entity.cpp:394: error:

How to statically compile an SDL game on Windows

╄→尐↘猪︶ㄣ 提交于 2019-11-28 04:25:19
I have been trying to produce a statically linked "single binary" version of my game for windows. I want to link with sdl, sdl_image and sdl_mixer which in turn pull in a few support libraries. Unfortunately I haven't found a way to get them all to compile and link using cygwin/mingw/gcc. As far as I can tell all existing public versions are only shared libraries / dlls. Please note that I'm not talking about licencing here. The source will be open thus the GPL/LGPLness of sdl is not relevant. When compiling your project, you need to make just a couple changes to your makefile. Instead of sdl

Xcode 5 crashes when running an app with SDL 2

六眼飞鱼酱① 提交于 2019-11-28 04:22:01
I tried to follow these two tutorials (or the applicable parts of them, due to version differences) to install SDL 2.0.2 to work with Xcode 5.1: Tutorial 1 Tutorial 2 Running any program with the SDL 2 framework linked causes Xcode to crash with the following problem details: Process: Xcode [1787] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 5.1 (5084) Build Info: IDEFrameworks-5084000000000000~21 App Item ID: 497799835 App External ID: 444172641 Code Type: X86-64 (Native) Parent Process: launchd [257] Responsible: Xcode [1787] User ID: 501 PlugIn

Haskell library for 2D drawing [closed]

不打扰是莪最后的温柔 提交于 2019-11-28 02:54:09
I basically want to create a full screen window and draw text on it in different colors and sizes (and also update the screen). I've used pygame for this in python and I'm looking for a similar library (should be fairly easy to use). +1 if it handles input too... If you're looking for a specialized game library, you have a number of options that you can find here . FunGEn is probably your best option out of those libraries. However, your question seems to suggest a game library would be a bit overkill, if all you're looking to do is draw text and receive input. In that case, you might opt for