CRM32Pro SDK  v5.22
Installation, setup and details on Windows platforms using GNU GCC/G++ 3.4.5 library version


Requirements

  • Windows 95/98/Me/NT/2000/XP/Vista and Win7. 32bits and 64bits versions

  • Mingw32, Bloodshed Dev-C++ and Code::Blocks with GNU C/C++ 3.x or 4.x)

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

  • Available video backends:

    • Windib. Does not provide any hardware support so it is executed by the CPU. On modern systems it is quite fast. Supports full and window screen. Default video backend.
    • OpenGL. Provides hardware support so it is mainly executed by the GPU. Supports full and window screen. However, the application needs to be developed keeping in mind some concepts explained on this page
    • DirectX. Provides limited hardware support (surfaces with alpha information slow down the blitting) through DDraw module only on full screen modes. For newer Windows XP, Vista and 7 machines it could not work as DDraw is deprecated. It is better to use Windib on software modes or OpenGL for hardware ones.

  • Available audio backends:
    • dsound. Uses DirectSound module and in same cases, it has hardware support. Default audio backend.
    • waveout. Uses waveOut Windows API and does not have hardware support. In some systems, it could cause a little delay when a new sound/music is played.