Gph_Sdk: Can't Compile Dge Examples


CoderTobi76

Still Fresh
Joined
Nov 20, 2010
Messages
5
Hello!

I would like to start coding for the caanoo. Many years ago, i had much fun writing software for the GP32 (TobiDrummer) and now i would like to continue on the caanoo.

After some trials, i managed to compile the 2DTutorial example. I could not believe that it really worked ;)

But now i would like to learn using the examples in GPH_SDK\DGE\example. And i can't compile them. I tried it based on the configuration of the 2DTutorial where i exchanged the main c file. The result were the errormessages i quoted at the end.

Could anyone help me how to solve the problem?

Thanks in advance.

Greetings

Tobi



.target\main.o||In function `GetAppFrame()':|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|335|undefined reference to `DGE_GetTickCount'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|334|undefined reference to `DGE_GetTickCount'|
.target\main.o||In function `main':|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|192|undefined reference to `DGE_Init()'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|196|undefined reference to `DGE_SetMainRunFunc(int (*)(void*))'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|201|undefined reference to `DGE_CreateWindow(long (*)(void*, unsigned int, unsigned int, long), char*, int, int)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|206|undefined reference to `DGE_CreateDevice(char*, IDGE_Device**, void*, void*, void*, void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|215|undefined reference to `DGE_CreateSprite(char*, IDGE_Sprite**, void*, void*, void*, void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|225|undefined reference to `DGX_TFFontOpen()'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|234|undefined reference to `DGX_CreateFont(char*, IDGX_Font**, void*, void*, void*, void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|234|undefined reference to `DGX_CreateFont(char*, IDGX_Font**, void*, void*, void*, void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|234|undefined reference to `DGX_CreateFont(char*, IDGX_Font**, void*, void*, void*, void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|234|undefined reference to `DGX_CreateFont(char*, IDGX_Font**, void*, void*, void*, void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|234|undefined reference to `DGX_CreateFont(char*, IDGX_Font**, void*, void*, void*, void*)'|
.target\main.o:\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|234|more undefined references to `DGX_CreateFont(char*, IDGX_Font**, void*, void*, void*, void*)' follow|
.target\main.o||In function `main':|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|247|undefined reference to `DGE_Run()'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|260|undefined reference to `DGX_DestroyFont(IDGX_Font**)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|260|undefined reference to `DGX_DestroyFont(IDGX_Font**)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|260|undefined reference to `DGX_DestroyFont(IDGX_Font**)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|260|undefined reference to `DGX_DestroyFont(IDGX_Font**)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|260|undefined reference to `DGX_DestroyFont(IDGX_Font**)'|
.target\main.o:\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|260|more undefined references to `DGX_DestroyFont(IDGX_Font**)' follow|
.target\main.o||In function `main':|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|266|undefined reference to `DGX_TFFontClose()'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|270|undefined reference to `DGE_DestroySprite(IDGE_Sprite**)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|274|undefined reference to `DGE_DestroyDevice(IDGE_Device**)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|277|undefined reference to `DGE_DestroyWindow(void*)'|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|280|undefined reference to `DGE_Close()'|
.target\main.o||In function `Run(void*)':|
\cygdrive\c\GPH_SDK\Neuer Ordner (3)\main.cpp|144|undefined reference to `DGXVECTOR2::DGXVECTOR2(float, float)'|
||=== Build finished: 27 errors, 0 warnings ===|
 
Where can i fix it? Or how do i link a library? It is a difficult part for me since there are that many things to be set correctly.
 
I too wish to know - I want to begin coding for this great handheld as well, but I am getting errors similar to CoderTobi's about lacking references to the DGE library.
 
SolarLune said:
I too wish to know - I want to begin coding for this great handheld as well, but I am getting errors similar to CoderTobi's about lacking references to the DGE library.
Did you try to compile the 2DTutorial? This is the only project i can compile. So i thought, just replace the main c file with one of the other examples. But it did not work and i can't find the reason. Ok, maybe i could begin my work by modifying 2DTutorial, but without examples on every topic it can be difficult.
 
Last edited by a moderator:
I tried making my own main.c (?) file and putting #include <DGE_System.h> and 3 other includes, from the 1-System Example in the DGE folder, but it gave the same errors (I think) that you had. It's too bad GPH doesn't have better documentation - if it means anything, I'm using 10.11 SDK, I think. The documentation is from 10.08.
 
i dont have the caanoo sdk installed, but for sure you need to check out the makefile or the linker settings. you need to _link_ the the lib that contains the symbols you are missing.
 
I just solved it and compiled "C:\GPH_SDK\DGE\example\example1\3font".

My template still was 2DTutorial where i replaced the main c file with the one of 3font. In codeblocks i opened the linker settings (Project->Build Options->Linker settings, on the left side "target", gnu arm gcc compiler).

Now i opened the makefile from the 3font example and checked which libraries are involved.

I added these entries to the list in the linker settings. Now the list looks like this:

-lDGE
-lopengles_lite
-lglport
-lSDLmain
-lSDL
-lSDL_image
-lSDL_mixer
-lSDL_ttf
-lpng
-lz
-lpthread
-lts
-lsmpeg
-lfreetype
-ldge20
-lopenal11
-lopenalut11
-lc
-lm
-ldgx20

With this list no errors occured anymore. Now i can start! After 3 days of fighting ;)

Greetings

Tobi
 
Nice, CoderTobi. Using your code, the Caanoo version compiles for me. Thanks. However, the Computer version throws an error - that there are invalid uses of AL types, like ALVoid. I tried linking to the OpenAL Windows directory, but that didn't work. I'm not sure what the problem is - which libraries I'm not linking.
 
Back
Top