GP2X How To Use Visual C++ 2005 Express


mattyrb posted on Dec 1 2005 at 10:26 AM said:
Still having a right game getting this setup! I think I'm half way there...GCC Linker doesn't even seem to exist :S
Are you trying to add both the custom rules, GCC Compiler and GCC Linker? Can you give us a better idea of what you have working / not working so that someone can help you out. Is it compiling but not linking, or not doing either?
 
Last edited by a moderator:
I'll post a full lowdown on my problems tonight :) I'm at work right now hehe
 
right sed doesn't work at dos prompt....now is that because its called sed-3.59.exe and not sed?
 
anyone got a test project i can try to build to see if i've got this thing working now ? :)

"hello world" ? lol anything :lol:
 
slygamer posted on Dec 1 2005 at 10:55 PM said:
Kalakian, I will add your GCC Linker rule to the wiki tonight.

Cool, I have never updated a wiki b4 and wouldn't know where to start. I'm not much for documenting, I just hack things together till they work and leave it to someone else to document properly ;)

mattyrb posted on Dec 1 2005 at 11:04 PM said:
anyone got a test project i can try to build to see if i've got this thing working now ? :)

"hello world" ? lol anything :lol:

The wiki has a basic hello pixel program, which I modified to show a square in this thread: http://www.gp32x.de/board/index.php?showtopic=22436
 
Last edited by a moderator:
Makes no sense to me not being a visual c++ person :)

------ Build started: Project: RabbitRacer, Configuration: Debug Win32 ------
main.cpp
In file included from .\main.cpp(1):
.\/main.h(1):17: error: SDL.h: No such file or directory
.\/main.h: In function 'int main(int, char**)':
.\/main.h(17): error: 'SDL_Surface' was not declared in this scope
.\/main.h(17): error: 'screen' was not declared in this scope
.\/main.h(18): error: 'Uint16' was not declared in this scope
.\/main.h(18): error: 'p' was not declared in this scope
.\/main.h(23): error: 'SDL_INIT_VIDEO' was not declared in this scope
.\/main.h(23): error: 'SDL_Init' was not declared in this scope
.\/main.h(26): error: 'SDL_SWSURFACE' was not declared in this scope
.\/main.h(26): error: 'SDL_SetVideoMode' was not declared in this scope
.\/main.h(33): error: expected primary-expression before ')' token
.\/main.h(33): error: 'Uint8' was not declared in this scope
.\/main.h(33): error: expected primary-expression before ')' token
.\/main.h(41): error: 'SDL_Flip' was not declared in this scope
.\main.cpp: At global scope:
.\main.cpp(3): error: 'main' is not a class or namespace
.\main.cpp: In function 'int main()':
.\main.cpp(3): error: declaration of C function 'int main()' conflicts with
.\/main.h(14): error: previous declaration 'int main(int, char**)' here
.\main.cpp: At global scope:
.\main.cpp(7): error: expected constructor, destructor, or type conversion before '::' token
Build log was saved at "file://c:\Documents and Settings\Matt.MRB-L4DJVKKFLBU\My Documents\Visual Studio 2005\Projects\RabbitRacer\Debug\BuildLog.htm"
RabbitRacer - 17 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
You haven't told the GCC compiler where the SDL.h file can be found. This is done through the Additional Include Paths property in the GCC Compiler project settings.

Hint: Put your projects in a directory that has no spaces in it. GCC may complain about the spaces.
 
I've updated the wiki with the linker rule made by Kalakian. I merged it into the one rule file.

Here is a simple project using the new rules file on the wiki.
http://users.on.net/~sly/gp2x/test2.zip
Unzip this to somewhere on your drive, load it into VC++2005 and press F7 to build. It should spit out a test2.gpe file the debug directory. Put this on your GP2X, select Games and run test2. You will get a black screen with a single dot in the middle. Press the A button and the dot changes colour. Press L and R together to exit back to the menu.
 
yep...but...

has anyone been sucessfull compiling an app that uses:

SDL_Mixer / SDL_Image


;) ;)
 
Right I've successfully set the damn thing up!

I'd just like to say you lot have been a great help so far! This community sure does have alot of friendly, patient, helpful people in it!

Any ideas for how i can test my applications other than owning a GP2X....I'd like one but not right now hehe When I've got the cash maybe!
 
Argh - I am so close to getting SDL to work with this 2005 Express setup.

I have this .. in my additional paths for the GCC Compiler include

C:\devkitpro\devkitGP2X\include;C:\devkitpro\devkitGP2X\include\SDL

so it finds the SDL headers just fine.

I have this .. for my GCC Linker library paths.

C:\devkitpro\devkitGP2X\lib\

If you check in this directory you'll see.. libSDL.a, libSDL_image.a....

Except the compilation process reports this...

------ Build started: Project: GP32, Configuration: Debug Win32 ------
Linking GP32.gpe...
Debug\Main.o: In function `main':
Main.cpp:(.text+0x1c): undefined reference to `SDL_Init'
Main.cpp:(.text+0x38): undefined reference to `SDL_SetVideoMode'
Main.cpp:(.text+0x4c): undefined reference to `SDL_PollEvent'
Main.cpp:(.text+0x1d0): undefined reference to `SDL_MapRGB'
Main.cpp:(.text+0x1e4): undefined reference to `SDL_FillRect'
Main.cpp:(.text+0x200): undefined reference to `SDL_UpdateRect'
Main.cpp:(.text+0x218): undefined reference to `SDL_Quit'
Build log was saved at "file://c:\devkitpro\devkitGP2X\Projects\GP32\Debug\BuildLog.htm"
GP32 - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped

Any ideas? Any help apppreciated.

Cheers
 
jan_europa posted on Dec 2 2005 at 07:00 PM said:
yep...but...

has anyone been sucessfull compiling an app that uses:

SDL_Mixer / SDL_Image


;) ;)
Not me, and not using VC++ 2005 either. But anyway, if anyone manages to get them working, please tell us! From what I've read, there's plenty of people waiting for a working version of those libraries (me included :)). Thanks.
 
Last edited by a moderator:
miq01 posted on Dec 12 2005 at 03:39 PM said:
Not me, and not using VC++ 2005 either. But anyway, if anyone manages to get them working, please tell us! From what I've read, there's plenty of people waiting for a working version of those libraries (me included :)). Thanks.

Hey does that mean you got the core SDL library working with Visual Studio Express 2005? :)
 
Last edited by a moderator:
SolidSnake posted on Dec 12 2005 at 02:42 PM said:
any way to make this work with visual studio .net 2005?
or vc++ 2005 == vc++ .net 2003 ?

See this link. Take a look around the site - lots of good stuff to get your teeth sunk into.
 
Last edited by a moderator:
Galleon posted on Dec 12 2005 at 05:48 PM said:
Hey does that mean you got the core SDL library working with Visual Studio Express 2005? :)
Nope. I'm using Code::Blocks to code in XP, and then plain makefiles through CygWin to generate the GP2X version.
 
Last edited by a moderator:
Galleon posted on Dec 12 2005 at 10:18 PM said:
Argh - I am so close to getting SDL to work with this 2005 Express setup.

I have this .. in my additional paths for the GCC Compiler include

C:\devkitpro\devkitGP2X\include;C:\devkitpro\devkitGP2X\include\SDL

so it finds the SDL headers just fine.

I have this .. for my GCC Linker library paths.

C:\devkitpro\devkitGP2X\lib\

If you check in this directory you'll see.. libSDL.a, libSDL_image.a....

Except the compilation process reports this...

------ Build started: Project: GP32, Configuration: Debug Win32 ------
Linking GP32.gpe...
Debug\Main.o: In function `main':
Main.cpp:(.text+0x1c): undefined reference to `SDL_Init'
Main.cpp:(.text+0x38): undefined reference to `SDL_SetVideoMode'
Main.cpp:(.text+0x4c): undefined reference to `SDL_PollEvent'
Main.cpp:(.text+0x1d0): undefined reference to `SDL_MapRGB'
Main.cpp:(.text+0x1e4): undefined reference to `SDL_FillRect'
Main.cpp:(.text+0x200): undefined reference to `SDL_UpdateRect'
Main.cpp:(.text+0x218): undefined reference to `SDL_Quit'
Build log was saved at "file://c:\devkitpro\devkitGP2X\Projects\GP32\Debug\BuildLog.htm"
GP32 - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped

Any ideas? Any help apppreciated.

Cheers


Have you added SDL and SDL_image to the Additional Dependencies in the GCC Linker settings? It needs to know which libraries to link, not just where they might be.
 
Last edited by a moderator:
SolidSnake posted on Dec 12 2005 at 11:42 PM said:
any way to make this work with visual studio .net 2005?
or vc++ 2005 == vc++ .net 2003 ?
Visual C++ 2005 Express is a cut-down version of Visual Studio 2005. 2003 does not equal 2005.

Visual C++ 2003 does not have the custom build rules feature that we use for telling the IDE to use GCC instead of the built-in C/C++ compiler. In Visual C++ 2003, you must create a MakeFile project in order to use GCC.
 
Last edited by a moderator:
Back
Top