Getting Started Coding


puppet

Still Fresh
Joined
Dec 26, 2010
Messages
14
Hey everyone, new to the forums. I got the Caanoo to develop homebrew for and tinker with mainly, and have been trying to set about getting a running program on the device. I have coded some homebrew for old PalmOS and Nintendo DS before, with codeblocks for some simple C code, and worked with XCode for iOS dev so I thought this would be a fun portable console to try and get to grips with.

So after finally setting up the Codeblocks environment right (I'm pretty sure), for Windows (x86) I am stuck from where to go to try and get games/apps made and running on the Caanoo.

Info; Windows x86, Codeblocks set up, SDK installed, cygwin installed, path environment variable changed. Caanoo firmware 1.5 up and running, can run emulators and games on the device no problem.

Problems/Questions;

1. Compiled the Tutorial2D, pasted the .gpe to my SD card, on loading I get a flash of color (maybe a picture broken up?) then screen goes black and no response from any buttons, have to turn off and on, no idea what's wrong? When I compile in codeblocks I get this when compiling for target;
Code:
Executing: "\\.psf\Home\Documents\Programming\Caanoo\Source Code\GPH_SDK\project\2DTutorial\.target\2DTutorial.gpe"  (in \\.psf\Home\Documents\Programming\Caanoo\Source Code\GPH_SDK\project\2DTutorial\.)
Execution of '"\\.psf\Home\Documents\Programming\Caanoo\Source Code\GPH_SDK\project\2DTutorial\.target\2DTutorial.gpe" ' in '\\.psf\Home\Documents\Programming\Caanoo\Source Code\GPH_SDK\project\2DTutorial' failed.
Nothing to be done.
A .gpe file is created so I assumed this just means the PC cannot execute the .gpe file. Do I need a .ini file for it (if so how do I generate or write one?). If I try to compile for host it doesn't complete with the error "cannot find -lGL" for the file "ld.exe" - no idea what that is about

2. If I try to compile the template for a blank 'game' project (having set this up according to a guide I found here), I can compile the .exe version for 'host' and a picture is loaded, no interaction is enabled (likely as nothing is programmed). On the Caanoo, the target's build (as before gets the 'execution failed' error but generates a .gpe. This .gpe in the Caanoo will just exit immediately to the home screen if I try to execute it, no crash of the device. Ideas on what is going on?

3. Once I do get these or something compiled successfully where should I go from there? If I can compile tutorial/example project/s I can learn through picking them apart but are there any tutorials/documents aside the 'official' ones people have?

All help appreciated big-time, I can't wait to get a 'Hello World' up on screen never mind putting my pixel art and sprites to life on this device!
 
ok im pretty much in a standstill myself, and not very sure but you do need and ini file for the canoo to link the various files for the icons in teh menu and launch it. what you can do is copy the ini from another file and edit teh names and location, as for the rest i am also stuck... {:{>=
 
Thanks for that, got the title and icon images to load in the menu, but still not loading the .gpe's correctly (same 2 problems, exit and freeze as mentioned above for a blank project compile and the 2DTutorial compile respectively).

Anyone that can help in any way please do, I'm sure there are more than us here speaking out that are stuck like this :)
 
I think you may have the wrong SDK installed... which one did you use?
 
hmn said:
I think you may have the wrong SDK installed... which one did you use?

The 10.08 one, for windows, it unpacked fine, no errors and I could map everything in Codeblocks as instructed. Is there another version? If so could you link me to it and I'll install it over or wipe and reinstall that version.

Cheers :)
 
Last edited by a moderator:
It is just that in version 10.08 for Linux, the "2DTutorial" folder was removed. I guess the latest Windows SDK version is 10.11.03, available here. I did a quick install in Wine, and it also doesn't feature "2DTutorial" any longer.
 
hmn said:
It is just that in version 10.08 for Linux, the "2DTutorial" folder was removed. I guess the latest Windows SDK version is 10.11.03, available here. I did a quick install in Wine, and it also doesn't feature "2DTutorial" any longer.

Eugh, turns out I had the 10.11.03 installed, I have the 10.08 unzipped in another directory and thats where I found the 2DTutorial. In the 10.11 in DGE/Example 1 there is a 'tutorial2d' however.

How do I compile any of the examples? They can't find the header files when I try to compile the .cpp's. I don't follow the layout, there are 3 example folders, each with several folders within them, is each example folder the one project or several smaller ones? If they are all the one how do I compile them together, or if the latter how am I supposed to compile them as there is no option for host/target and I haven't had a successful compile.

Here's a screenie, why can't it find these header files? (tutorial2D.cpp)
View attachment 513

Same happens trying to compile other .cpp's from Example 1..
 
Last edited by a moderator:
you don't need to follow the pdf, instructions...

you just make at least one new compiler entry in code::blocks for the caanoo (arm compiler), and you add all the library paths and header paths etc. afterwards you will still need to add the libraries in the project options (like sdl dge etc)

those are mandotory for compiling for caanoo from windows! also if you want to change "targets" just add a new one, activate it and choose the "default" compiler for it (either caanoo or windows/ linux)

it's better to follow what's described here :

http://www.gp32x.de/board/index.php?/topic/57342-new-caano-sdk-for-windows/page__view__findpost__p__925209

or here :

http://www.gp32x.de/board/index.php?/topic/57925-tutorial-installing-caanoos-sdk-for-windows/
 
Last edited by a moderator:
It was the 2nd one there I followed to set it all up, I'll run through it again now and see how it goes. I didn't think I had to re-set-up all of these each time I made a project though.
 
puppet said:
It was the 2nd one there I followed to set it all up, I'll run through it again now and see how it goes. I didn't think I had to re-set-up all of these each time I made a project though.

that's correct, you only have to do it once (for adding the compiler)

however you WILL need to add the correct libraries and correct compiler (but not the settings since you made those once) for each project you start in the project options, or it won't link.

The errors your getting is because it can't find the header files so your search / include paths are not set up correctly.

OR

if your running under linux, the project (if it's an existsing) or you added wrong cased library names...

also your compiling for windows, since your in the ifdef of windows so your project is set up to compile for windows and not caanoo. would still work normally though, but i never tried compiling any of those dge samples (not even for caanoo) when i was testing the settings. so it could be certain paths are missing. I also think that 2nd url with instructions was based on the post i initially made but more detailed. I only compiled my own project i was working on, and that compiled fine for caanoo and ran on the caanoo... (it doesn't use DGE, but does use almost everything sdl related)
 
Last edited by a moderator:
Thanks for the posts joyrider, appreciated ^^. I went through it all again, wiped and reinstalled cygwin and the SDK, went through both guides again setting up codeblocks. I can still compile for Windows, no errors there, but now on compiling for Caanoo/target I'm getting this;
View attachment 514

Is the 'Project Settings/target/Linker Settings' where I add the correct libraries? A blank application or game project will not compile now as you can see with those errors, what have I missed directing codeblocks to? I've double checked over both tuts, whatever I've done wrong if it's on them I can't see it.. One of the guides specifically mentions a "main.cpp:1:" error which is fixed by adding a path in Project Build Options/target/Search Directories/Compiler (or linker, can't remember but I followed the guide to the T). In the Resource compiler of that area do I need to add a path to anywhere?
The build log when I get this error;
View attachment 515

You mentioned 'running under linux'? unsure what you meant, I'm using Windows for this as my OS.

Sorry about any noobishness here, quite frustrated at myself not being able to set this up


[Edit]: Is DGE just a way of avoiding SDL? It sounds like SDL is lower level programming thus is it a wiser choice to get learning rather than DGE once I am able to compile?
 
i never used dge, it's something gph wiped up, it probably contains SDL as well as some other things (for like the touchscreen, vibration , gsensor etc)

from what i can see at the screenshot(s) you have a few errors :

here's how to fix em :

- if you get errors refering to headers which can not be found (*.h files) you'll have to search for the locations where they are located, for example i noticed you put include <SDL.h> i'm guessing here but sometimes SDL.h is located in a subdir "sdl" so the include statement should be #include <SDL/SDL.h> (relative to the search paths you entered)

and yes that other screenshot is the project options, there you have to add the libraries and perhaps other linking options when needed (like SDL, m (from math) etc).. you will need to do that per project
but not doing so will give you errors at linking time, but you don't get that far, you get errors at compile time because it can't find certain header files..

I also noticed sometimes but i don't know why that sometimes it helps if you write #include "SDL/SDL.h" instead of <SDL/SDL.h>, i don't know quite the diffrence though

i was refering to linux since i did not know whar your os was. Windows is not case sensitive, linux is so this means in windows #include "SDL/SDL.H" is the same as "SDL/sDl.h" or "sdl/sdl.h" but in linux it is not the same (all diffrent).

try fixing the sdl (header related) errors first
 
The SDL error isn't popping up now. I think I get the way includes are made now, the headers should be findable relative to the set directories in the 'Compiler and Debugger/Search Directories/Compiler'?

As for the next 50+ errors;
Code:
-------------- Build: target in Take4 ---------------

Compiling: main.cpp
cygwin warning:
  MS-DOS style path detected: C:/Program Files (x86)/CAANOO/GPH_SDK/include
  Preferred POSIX equivalent is: /cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/include
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
In file included from main.cpp:1:
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:49: error: expected constructor, destructor, or type conversion before 'typedef'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:50: error: '__END_NAMESPACE_STD' does not name a type
In file included from main.cpp:1:
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:91: error: expected constructor, destructor, or type conversion before 'typedef'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:97: error: expected constructor, destructor, or type conversion before 'typedef'
In file included from main.cpp:1:
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:155: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:162: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:172: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:182: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:186: error: expected initializer before '__wur'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:192: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:205: error: expected initializer before '__wur'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:214: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:219: error: 'FILE' was not declared in this scope
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:219: error: '__stream' was not declared in this scope
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:229: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:249: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:255: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:274: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:276: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:283: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:289: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:294: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:300: error: expected initializer before '*' token
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:307: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:311: error: 'FILE' was not declared in this scope
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:311: error: expected primary-expression before '__restrict__'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:311: error: expected primary-expression before 'char'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:312: error: expected primary-expression before 'int'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:312: error: expected primary-expression before '__n'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:312: error: initializer expression list treated as compound expression
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:312: error: expected ',' or ';' before 'throw'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:318: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:322: error: variable or field 'setlinebuf' declared void
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:322: error: 'FILE' was not declared in this scope
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:322: error: '__stream' was not declared in this scope
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:331: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:346: error: 'FILE' was not declared in this scope
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:346: error: expected primary-expression before '__restrict__'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:346: error: expected primary-expression before 'const'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:347: error: expected primary-expression before '__arg'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:347: error: initializer expression list treated as compound expression
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:356: error: '__END_NAMESPACE_STD' does not name a type
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:374: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:379: error: expected initializer before '__wur'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:382: error: expected initializer before '__wur'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:403: error: expected constructor, destructor, or type conversion before 'extern'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:409: error: expected initializer before '__wur'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:441: error: '__END_NAMESPACE_STD' does not name a type
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:458: error: expected initializer before '__wur'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:500: error: '__END_NAMESPACE_C99' does not name a type
Process terminated with status 1 (0 minutes, 4 seconds)
50 errors, 0 warnings

Whats this all about?



[Edit]: Oh sweet moses now the .exe won't compile, SDL.dll is missing? 'The program can't start because SDL.dll is missing from your computer' and the compiler cannot start so no log etc. What have I done?
 
not sure about those, can't really tell but your trying to compile the 2d tutorial thing right ?

i'll see if i can get it compiled, the only diffrence with my setup (in windows) is that i did not install the gph stuff in program files since it contains spaces but i'm not certain if that can (still) cause problems

i'll keep you updated
 
Oh sweet moses now the .exe won't compile, SDL.dll is missing? 'The program can't start because SDL.dll is missing from your computer' and the compiler cannot start so no log etc. What have I done?

that's normal you need the sdl runtimes (which on windows are a dll file and in this case sdl.dll, you should look if they are included in gph stuff, if so either add it to the path system variable or copy them were the exe file is located. (you'll probably get some other missing dll errors if you use sdl_mixer etc)
 
No the dll error is just trying to compile host blank projects (game or app), it worked fine before. The System path variable is currently set to C:/cygwin/bin as the guides told me to set it, how do I add it as well to the path system variable?

Yeah any info on the weird

Code:
error: expected constructor, destructor, or type conversion before 'typedef'
/cygdrive/c/Program Files (x86)/CAANOO/GPH_SDK/tools/cross-eabi/bin/../arm-gph-linux-gnueabi/sys-root/usr/include/stdio.h:50: error: '__END_NAMESPACE_STD' does not name a type

error is much appreciated, still hunting about for info on it
 
i took me a while, but i'm able to compile tutorial2d for the caanoo and the binary works, it seems to be some sort of space shooter example...

it takes quite a few things to get it working though but mostly just adding libraries in the right order :)

make new empty project
add the main.cpp from the tutorial2d dir

edit search paths (for the project) and add :

for compiler :C:\GPH_SDK\DGE\include (modify to reflect your installation)
for linker : C:\GPH_SDK\DGE\lib\target and C:\GPH_SDK\lib\target

edit linker settings and add following libraries in the same order :

dgt20
dgx20
dge20
dge
drmcode
openal11
openalut11
opengles_lite
glport
ts
freetype
png
z
pthread
c
inkadrm

edit project properties, disable autogenerating extentions and change the filename to test.gpe or something

save everything (oh yeah be sure that you compiler for the new project is set to the caanoo one)

and compile / link, it should give no errors and the test.gpe (caanoo) binary is located in the bin dir somewhere.

copy this binary (test.gpe) to the tutorial2d folder (in the main dir), and then copy the binary along with the asset directories
(so basically everything in the tutorial2d directory) to the caanoo (safely remove the caanoo drive in windows)

and goto the explorer, the run the test.gpe

all works fine here.

However i'm unable to get a working windows binary, since it seems in my setup i do not have all the (windows) libs ..., maybe it works using the *.lib files and visual studio but i aint using that :)

i wouldn't suggest using the DGE stuff though, sdl seems easier to me and you have everything you need there but it could just be an habbit, and i'm not certain you can use the touchscreen or gsensor etc from within sdl
 
Woah, thanks for the effort,

dgt20
dgx20
dge20
dge
drmcode
openal11
openalut11
opengles_lite
glport
ts
freetype
png
z
pthread
c
inkadrm

Could you give me a quick print screen of these paths, I'm not sure exactly where I should be searching for these titles of libraries and have found multiple ones with similar names for many of these?

[Edit]:What is the difference between .so and .a? For the ones I have found I've used the .so versions. Can't find pthreat, c or inkadrm yet.

[Edit Edit]:What's the reasoning behind the specific order, and how do you figure it out? How the compiler searches for things? The order they are used in the code?
 
Right I found files for all of that list in the GPH_SDK subfolders, using the .so versions of them, as shown below;
View attachment 516


Still cannot compile however, whatever I've done beforehand is blocking the compile, as shown in the bottom half of the print screen.

This occurs on compiling even blank projects now, (both App and Game), I must have messed a setting in the wrong place somewhere along the line. Any ideas?
 
puppet said:
Could you give me a quick print screen of these paths, I'm not sure exactly where I should be searching for these titles of libraries and have found multiple ones with similar names for many of these?

Also you do not need to add the paths, not even the *.so files, you just need to add the libs as i wrote em. You see at linking time it will find the libraries with the linker search path, the -L<path> (switches). for example c:\sdk\lib (fictive path, i made this up) you add to the linker search path, then there exist(s) libname.a & libname.so files for example libsdl.a libdge20.so etc. you just need to add the part after the lib part till the point. so in the example of libsdl.so/.a just add sdl, the linker will find the files for you.

puppet said:
[Edit]:What is the difference between .so and .a? For the ones I have found I've used the .so versions. Can't find pthreat, c or inkadrm yet.
Okay i think the *.a files are the staticly linked libraries (which you use for static linking as well), the *.so ones are the shared libraries when you dynamicly link.

there are 2 diffrent paths, one with a dge subdir ( dge\lib) and one without a dge subdir (\lib)

puppet said:
[Edit Edit]:What's the reasoning behind the specific order, and how do you figure it out? How the compiler searches for things? The order they are used in the code?

Compiler find things with the -I switch (for the header files), the linker will find things with the -L switch (for libraries). I'm not certain if you dynamically link the order matters but i think it does. The order is related to which lib depends on another lib like for example sdl_mixer depends on sdl i think you need to add sdl_mixer before sdl then (or was it the other way around, cant remember), I just trial and error a bit mostly on basis of the undefined references to get the right order, once i found it i can use it in most projects.
 
Last edited by a moderator:
Back
Top