User forums > Using Code::Blocks
sdl compiling
unclereg:
ok ... fairly rigourous this site eh ? .....
even pedantic .... I get the feeling that no one remembers being a
newbie...I am ok with c++ , I remember the tools and how to combine them but
the environment and it's links to libraries are practically unique and as such a newbie
is faced with an array of settings that are mundane to a versed user..
Thaks for the link and your help... didn't see a rush to help me ... good on ya BlueHazzard..
no doubt we shall talk in future ..
do you like triphop ? ........
https://soundcloud.com/uncle-reg
unclereg:
It's not really an SDL problem though is it ? ... it's a problem linking a lib to code blocks ...
kinda says that newbie problems with their setup IS handled on this very site ...
says it in the induction post ..
unclereg:
pretty sure the code i copied and pasted into the 'other linked libraries' right hand window was
erroneous for me ... since all my sdl stuff is somewhere else ... mydocuments tbp
hence the code ...
--- Code: ----lmingw32 -lSDL2main -lSDL2
--- End code ---
. copied from tut
(i've never seen this '-object notation before)
http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/index.php
is wrong yeah ?
stahta01:
Please read the rules before you are banned!
http://forums.codeblocks.org/index.php/topic,9996.0.html
Tim S.
BlueHazzard:
look i really want to help you. My english is not the best so i write in short pointy style to make my points clear...
--- Quote from: unclereg on July 02, 2016, 12:07:58 am ---It's not really an SDL problem though is it ? ... it's a problem linking a lib to code blocks ...
--- End quote ---
1) according this error:
--- Code: ---C:\Users\Owner\Documents\uz01_hello_SDL-5\01_hello_SDL\01_hello_SDL.cpp: In function 'int SDL_main(int, char**)':
C:\Users\Owner\Documents\uz01_hello_SDL-5\01_hello_SDL\01_hello_SDL.cpp:15:2: error: 'SDL_Window' was not declared in this scope
SDL_Window* window = NULL;
--- End code ---
you have a compiling not a linking problem
2) according this line:
--- Code: ---mingw32-g++.exe -Wall -std=c++11 -g -std=c++11 -IC:\Users\Owner\Documents\sdlunzipped\SDL-1.2.15\include\SDL -c C:\Users\Owner\Documents\uz01_hello_SDL-5\01_hello_SDL\01_hello_SDL.cpp -o obj\Debug\Users\Owner\Documents\uz01_hello_SDL-5\01_hello_SDL\01_hello_SDL.o
--- End code ---
You have corretly added the include paths so that the compiler can find the include files
according this code:
--- Code: ---#include <SDL.h>
--- End code ---
you include some sdl header, but you get some errors, so i presume that your sdl installation is broken, or you mix sdl with sdl2... Both are not problems with codeblocks, but with sdl
i am not familiar with sdl so i googeled for two seconds and found this:
--- Quote from: BlueHazzard on June 30, 2016, 10:47:01 pm ---2) http://stackoverflow.com/questions/12695719/sdl-window-does-not-name-a-type or use google future, you have now a sdl problem, not a code blocks problem and so this is the wrong forum to ask this questions
--- End quote ---
and so Tim came to this conclusion
--- Quote from: stahta01 on July 02, 2016, 01:07:24 am ---Please read the rules before you are banned!
http://forums.codeblocks.org/index.php/topic,9996.0.html
--- End quote ---
If you have found out, that you are using sdl2 headers, but want to use sdl1 headers, and you don't know where to set the right path so the compiler can find your sources, you can ask this here (but you can set include paths as there are set some in 2) ) ... but for other questions, like "error: 'SDL_Window' was not declared in this scope" we have to ask you to search help in a other forum. They will tell you: "you have to include xy" or "you have to add zq to your compiler search directories". Then you can come back and ask "how do i add zq to my compiler search directories?" and we will happily help you...
greetings
Navigation
[0] Message Index
[*] Previous page
Go to full version