Requirements
Library installation (using DevPak)
-
Preferred method if you are using Bloodshed Dev-C++.
Note that Code:Blocks supports DevPak installation although it was not tested.
-
DevPak will install these files on your Dev-C++ installation:
-
"CRM32Pro.gnu.dll" on Windows system folder
-
include files
-
static library files
-
documentation file
-
examples (binaries, code and Dev-C++ projects)
-
template
-
From now on "CRM32Pro.gnu.dll" is available for any application that uses it: SpacePong...
Library installation (manual installation)
-
Unpack "CRM32Pro-win32-gnu-X.YZ.rar" on a destination path (CRM32PRO_INST_DIR)
-
CRM32PRO_INST_DIR path must be in the system search path, the best way to do that is adding a new entry to the PATH environment variable:
-
right click on "My Computer"
-
click on Properties/Advanced/Environment Variables
-
under System variables, look for PATH entry, edit it adding CRM32PRO_INST_DIR value.
-
From now on "CRM32Pro.gnu.dll" is available for any application that uses it: SpacePong...
Compiling your own applications
-
In case you installed the library using the DevPak, you could create a new project on Bloodshed Dev-C++ IDE using the CRM32Pro template or following the steps below.
-
To develop applications or compile the examples using GNU GCC/G++, we have to add the include and library (CRM32PRO_INST_DIR) to the compiler paths. There are two ways to do it:
-
Copy static libraries(CRM32Pro.gnu.lib,sdlmain.gnu.lib and sdlmainIO.gnu.lib) to the path of GNU C/C++ where the libraries are stored(usually /lib/), and "CRM32Pro.h" with "SDL folder", to the path of GNU C/C++ where the include files are stores (usually /include/)
or
-
Using the compiler parameters to set location of the libraries (CRM32PRO_INST_DIR/sdlmain.gnu.lib and CRM32PRO_INST_DIR/CRM32Pro.gnu.lib) and the includes (-ICRM32PRO_INST_DIR).
-
Include "CRM32Pro.h" at the beginning of your code
-
Link against the main library:
-
"CRM32Pro.gnu.lib" to use the dynamic library version(CRM32Pro.gnu.dll)
-
Link against the SDLmain library:
-
"sdlmain.gnu.lib" for console and windows applications without SDL log errors output
or
-
"sdlmainIO.gnu.lib" for console and windows applications with SDL log errors output
or
-
For MFC applications, this is not required
-
If you use GNU GCC/G++ from mingw32 and GCC/G++, these are the minimum commands:
"gcc -mwindows -lmingw32 example.cpp -o myoutput.exe CRM32Pro.gnu.lib"
-
In case of doubts, the Makefile project to build the examples can be checked, used and modified.
Important notes
|