Code::blocks


zergling

Still Fresh
Joined
Feb 22, 2011
Messages
7
Good Morning Everyone :)
I am opening up this thread because I am having problems in compiling any examples founded in the GPH_SDK.
For instance, if I compile any examples, I get the error below


Code:
||
../../../include/DGE_Type.h|73|error: conflicting declaration ‘typedef unsigned int size_t’|
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h|211|error: ‘size_t’ has a previous declaration as ‘typedef long unsigned int size_t’|
/home/giuseppe/Downloads/GPH_SDK/DGE/example/example1/3sprite/main.cpp||In function ‘INT main(INT, char**)’:|
/home/giuseppe/Downloads/GPH_SDK/DGE/example/example1/3sprite/main.cpp|237|warning: comparison between signed and unsigned integer expressions|
||=== Build finished: 2 errors, 1 warnings (0 minutes, 0 seconds) ===|

Could someone please help me out?
I followed the guide for setting up Code::Blocks founded in the GPH_SDK.

Bye and thank you very much.

P.S. My OS is Debian Squeeze 64 Bit
 
Does anyone know if there is another guide beside the official one to set up Code::Blocks?
I really need to fix this issue because I bought the Caanoo to make my own games.

Bye guys and thank you again.
 
That seems to be an error in DGE.

Try commenting out line 73 in DGE/include/DGE_Type.h, like so:
Code:
typedef unsigned char           BYTE;
typedef unsigned short          WORD;
typedef unsigned int            UINT;
//typedef unsigned int          size_t;
 
hmn said:
That seems to be an error in DGE.

Try commenting out line 73 in DGE/include/DGE_Type.h, like so:
Code:
typedef unsigned char           BYTE;
typedef unsigned short          WORD;
typedef unsigned int            UINT;
//typedef unsigned int          size_t;

I will try it out tonight; I am at school right now.
Just for curiosity... Do you have in Code::Blocks under Projects-> Build Options -> your_project _name -> host -> Linker settings

Code:
-ldge20
-lGL
-lEGL
-lGLES_CM
-lSDLmain
-lSDL
-lSDL_image
-lSDL_mixer
-lSDL_ttf
-lsmpeg
-Wl,-rpath,/home/giuseppe/Downloads/GPH_SDK/DGE/lib/host
-Wl,-rpath,/home/giuseppe/Downloads/GPH_SDK/host

Projects-> Build Options -> your_project _name -> host -> Search Directories
Code:
/usr/lib
~/GPH_SDK/DGE/include
~/GPH_SDK/DGE/include/SDL
~/GPH_SDK/include


Projects-> Build Options -> your_project _name -> target -> Linker settings

Code:
-ldge20
-lopengles_lite
-lglport
-lSDL
-lSDL_image
-lSDL_mixer
-lSDL_ttf
-lpng
-lz
-lpthread
-lts
-lsmpeg
-lfreetype

Projects-> Build Options -> your_project _name -> target -> Search Directories
Code:
/usr/lib
~/GPH_SDK/DGE/include
~/GPH_SDK/DGE/include/SDL
~/GPH_SDK/include
 
Last edited by a moderator:
I think you will have a lot of trouble getting the host (PC) build to work, because the DGE libraries are 32-bit only, and you have a 64-bit system.
AFAIK you cannot mix 32- and 64-bit libraries, so you need a full set of all required libraries in either 32- or 64-bit.

The target (Caanoo) build is not affected by this of course, as it is always 32-bit.

For the host build, here are some options:
  • Somehow get a 64-bit build of the DGE libraries
  • Install/build 32-bit versions of every lib required by DGE (except for those already included in the SDK) and build with "-m32" compiler/linker option
  • Install a 32-bit OS
  • Don't use DGE
My suggestion would be to not use DGE and start with plain SDL instead, of which 64-bit-builds are naturally available in Debian.
 
I am getting the same issues even with Ubuntu 32 bit.

At this point, would be possible to have a guide from someone out there that got the SDK working in Linux?
I would really appreciate this because I bought this device with the purpose of developing games.

Could someone please me what he/she has under linker settings and search directories?

Bye and thank you very much.

P.S. My Id is Pspino in skype :ph34r:
 
I don't really use Code::Blocks myself, but I gave it a quick try and the host build worked out of the box without any changes to the settings. For a target build I'd have to adjust the paths, as I did not unpack the SDK in my home directory.
 
these photo's, on flickr show my setup for using the gph caanoo sdk on windows. Maybe it will help you. I do remember if you switch to windows you'll have to install cygwin (normal install) first otherwise you might get other weird errors.

http://www.flickr.com/photos/59881376@N03/sets/72157626123802876/

I hope this helps to get your setup going. I also have a setup under code::blocks in ubuntu, but it has been way too long since i used that setup..
 
joyrider said:
these photo's, on flickr show my setup for using the gph caanoo sdk on windows. Maybe it will help you. I do remember if you switch to windows you'll have to install cygwin (normal install) first otherwise you might get other weird errors.

http://www.flickr.com/photos/59881376@N03/sets/72157626123802876/

I hope this helps to get your setup going. I also have a setup under code::blocks in ubuntu, but it has been way too long since i used that setup..

Hi Joyrider and hmn,
I am trying to do some more test and in case I do not solve my issues, I will let you know right away.
By the way, Could you tell me your code::blocks setting in Ubuntu Joyrider?
Bye guys and thank you very much
 
Last edited by a moderator:
Back
Top