errors in project using SDL (Lode's Computer Graphics Tutori |
barracude
|
I installed SDL in Codeblocks but I have problem to make the project working because there are some errors
All project files are here: http://lodev.org/cgtutor/ Now the errors are in file: quickcg.cpp downloadable here http://lodev.org/cgtutor/files/quickcg/quickcg.cpp
quickcg.cpp||In function 'void QuickCG::screen(int, int, bool, const string&)' quickcg.cpp|115|error: 'SDL_FULLSCREEN' was not declared in this scope| there are more errors like that one. The other ones:
quickcg.cpp|1033|error: 'SDL_Keysym' has no member named 'unicode'| Warnings:
What causes the errors? Any suggestion how to correct the errors? Full build log: -------------- Clean: Debug in FT (compiler: GNU GCC Compiler)--------------- Cleaned "FT - Debug" -------------- Build: Debug in FT (compiler: GNU GCC Compiler)--------------- mingw32-g++.exe -Wall -fexceptions -g -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -c "R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\fourier1d.cpp" -o obj\Debug\fourier1d.o mingw32-g++.exe -Wall -fexceptions -g -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -c "R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\fourier2d.cpp" -o obj\Debug\fourier2d.o mingw32-g++.exe -Wall -fexceptions -g -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -c "R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\main.cpp" -o obj\Debug\main.o mingw32-g++.exe -Wall -fexceptions -g -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -IP:\PROGRAMY\programming\SDL-2.0.3-lib-MinGW\include -c "R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp" -o obj\Debug\quickcg.o R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In function 'void QuickCG::screen(int, int, bool, const string&)': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:115:71: error: 'SDL_FULLSCREEN' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:115:85: error: 'SDL_SetVideoMode' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:120:55: error: 'SDL_HWSURFACE' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:120:71: error: 'SDL_HWPALETTE' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:120:84: error: 'SDL_SetVideoMode' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:128:39: error: 'SDL_WM_SetCaption' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:130:22: error: 'SDL_EnableUNICODE' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In function 'void QuickCG::redraw()': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:152:33: error: 'SDL_UpdateRect' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In function 'void QuickCG::waitFrame(double, double)': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:254:34: error: 'SDL_GetKeyState' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In function 'void QuickCG::readKeys()': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:285:32: error: 'SDL_GetKeyState' was not declared in this scope R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In function 'Uint8 QuickCG::getInputCharacter()': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1033:25: error: 'SDL_Keysym' has no member named 'unicode' R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1037:32: error: 'SDL_Keysym' has no member named 'unicode' R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In static member function 'static long unsigned int QuickCG::decodePNG(std::vector<unsigned char>&, long unsigned int&, long unsigned int&, const unsigned char*, long unsigned int)::PNG::readBitFromReversedStream(size_t&, const unsigned char*)': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1573:150: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses] R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In member function 'void QuickCG::decodePNG(std::vector<unsigned char>&, long unsigned int&, long unsigned int&, const unsigned char*, long unsigned int)::PNG::setBitOfReversedStream(size_t&, unsigned char*, long unsigned int)': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1580:129: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses] R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp: In member function 'int QuickCG::decodePNG(std::vector<unsigned char>&, long unsigned int&, long unsigned int&, const unsigned char*, long unsigned int)::PNG::checkColorValidity(long unsigned int, long unsigned int)': R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1586:14: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1585:14: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] R:\PROGRAMS\C++\Fourier Transform\FT-codeblocks\quickcg.cpp:1584:9: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] Process terminated with status 1 (0 minute(s), 1 second(s)) 12 error(s), 5 warning(s) (0 minute(s), 1 second(s)) |
|||||||||||||||||||
|
barracude
|
I tried the project first with SDL 2-2.0.3 (actual log) and then with SDL 1.2.15 (the logs seems to be same).
|
|||||||||||
|