Tutorial 2
How to setup VC++ 6 (or higher) with Gamepark Windows libraries.
In
this tutorial you will learn how to set up Microsoft Visual C++ 6 to develop
GP32 programs using the Windows Gamepark SDK.
In my opinion, this is one of the best ways to code programs for the GP32, even
if you are sometimes restricted in what you can do, for example when you want to
use a GP32 precompiled library, as you surely won't find the Windows version, or
when you need assembler.
Don't forget to read the FAQ to fix up the compatibility problems you can find with this SDK.
You shouldn't spend more than 10 minutes to setup the SDK and test it.
1. Download needed files.
GamePark libraries for Windows. These archives are simplified versions of the official work_en.zip file (5.10MB), with no examples, and with some more files. Just what you really need.
16 bits C test program, or 16 bits C++ test program (70.1KB).
2. Unpack Win32Lib.*.zip.
Extract all files in the Win32Lib.*.zip archive you have chosen to download into your GP32 projects main folder. In my case all my GP32 projects are located in C:\Src\GP32\. In this case all files should be extracted into the C:\Src\GP32\ folder. The resulting structure should be something like this:
src
gp32
Include
Win32Lib
DLL
gpwin
gpwinlib
debug
release
include
resources
Folder Description VC++ 6 VC++ .NET ...\Include It's the place where I put all my GP32 libraries. In it you will find compatibility.c and compatibility_cpp.cpp, two compatibility modules needed to solve some issues found with the SDK. Read the FAQ for more info. Yes Yes ...\Win32Lib\DLL Inside this folder are located the old VC++ 6 DLLs. No Yes ...\Win32Lib\gpwin\gpwinlib\debug Debug version of Gamepark SDK library. Yes Yes
+
VC++ 6 debug LIBs...\Win32Lib\gpwin\gpwinlib\release Release version of Gamepark SDK library. Yes Yes
+
VC++ 6 release LIBs...\Win32Lib\include GP32 SDK header files. Some have been modified to accommodate compatibility*.* modules. Yes Yes ...\Win32Lib\resources Mask and icon used to generate the .exe file. Yes Yes
3. Copy old DLLs.
If you want to use the SDK with VC++ .NET, you will need the old VC++ 6 DLLs. Copy all files in DLL folder to your system32 Windows folder.
4. Test.
Extract all files in 16bitsTest.zip (or 16bitsCppTest.zip) into a folder. In my case all my GP32 projects are located in C:\Src\GP32\. In this case all files would be extracted into the C:\Src\GP32\16bitsTest (or C:\Src\GP32\16bitsCppTest) folder.
Open 16b_test.dsw workspace with VC++. If you use VC++ .NET it will converted to a newer format.
Build and run the test program.
Note: The project file included in this test file is not optimal. It would be a lot more useful if it contained a third group of settings to compile directly for the GP32 with, for example, devkitARM, and launch the executable with Geepee32.
I've tried, but didn't manage to do it. If someone finds the solution, please send it to me and I will include it in the test program.
5. Create a new project in C (VC++ 6).
Create a new folder into your projects main folder.
Copy all files in 16bitsTest folder into the new folder.
Optional: rename the .dsp and .dsw files to the new project name.
Optional: open the .dsp and .dsw files with an editor like Notepad and replace all occurrences of the string 16b_test with the name of the project.
Optional: if you have a makefile, do the same with it.
6. Create a new project in C++ (VC++ 6).
Create a new folder into your projects main folder.
Copy all files in 16bitsCppTest folder into the new folder.
Optional: rename the .dsp and .dsw files to the new project name.
Optional: open the .dsp and .dsw files with an editor like Notepad and replace all occurrences of the string 16b_test with the name of the project.
Optional: if you have a makefile, do the same with it.