diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-17 13:57:40 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-17 13:57:40 +0200 |
commit | 47400c70c31a0d7864ab95dfb7342248c89fe6a7 (patch) | |
tree | 73e2d146a21c5711b8eb8ac3e468979828df9218 | |
parent | a3c1a5eaa367e63fe58ed4a6dec16ac3a1f082e2 (diff) | |
download | meson-47400c70c31a0d7864ab95dfb7342248c89fe6a7.zip meson-47400c70c31a0d7864ab95dfb7342248c89fe6a7.tar.gz meson-47400c70c31a0d7864ab95dfb7342248c89fe6a7.tar.bz2 |
Use iostream stuff to ensure stdlibc++ linking is ok.
-rw-r--r-- | manual tests/3 standalone binaries/myapp.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/manual tests/3 standalone binaries/myapp.cpp b/manual tests/3 standalone binaries/myapp.cpp index fec80c5..3779578 100644 --- a/manual tests/3 standalone binaries/myapp.cpp +++ b/manual tests/3 standalone binaries/myapp.cpp @@ -1,10 +1,14 @@ #include<SDL.h> #include<memory> +#include<iostream> +#include<string> int main(int argc, char **argv) { SDL_Surface *screenSurface; SDL_Event e; int keepGoing = 1; + std::string message; + if(SDL_Init( SDL_INIT_VIDEO ) < 0) { printf( "SDL could not initialize! SDL_Error: %s\n", SDL_GetError() ); } @@ -13,6 +17,12 @@ int main(int argc, char **argv) { std::unique_ptr<SDL_Window, void(*)(SDL_Window*)> window(SDL_CreateWindow( "My application", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN), SDL_DestroyWindow); screenSurface = SDL_GetWindowSurface(window.get()); + // Use iostream etc to make sure we have not screwed + // up libstdc++ linking. + message = "Window created."; + message += " Starting main loop."; + std::cout << message << std::endl; + while(keepGoing) { while(SDL_PollEvent(&e) != 0) { if(e.type == SDL_QUIT) { |