Create a multi-platform project with Hekkus

Home / Support / Tutorials / Using ClassESound and Hekkus Sound System / Create a multi-platform project with Hekkus

Prepare project workspaces/solutions

This project will be based on the helloworld multi-platform code sample from the getting started tutorial.

First include and link Hekkus with the project. You can add Hekkus for the following Windows-based workspaces/solutions by going to the project properties and adding additional include directories and library paths:

Microsoft Visual C++ (all versions) include directories

.,..\..\edge\include,..\..\hekkus (Windows desktop and Windows Mobile)

Microsoft Visual C++ 6.0 library paths

..\..\edge\lib\pc-x86,..\..\hekkus\lib\xp (Windows desktop)

Microsoft Embedded Visual C++ library paths

..\..\edge\lib\ppc-arm,..\..\hekkus\lib\ppc-arm (Pocket PC)
..\..\edge\lib\ppc2003-arm,..\..\hekkus\lib\ppc-arm (Pocket PC 2003)
..\..\edge\lib\smartphone-arm,..\..\hekkus\lib\ppc-arm (Smartphone)
..\..\edge\lib\smartphone2003-arm,..\..\hekkus\lib\ppc-arm (Smartphone 2003)

Microsoft Visual C++ 2005 library paths

..\..\edge\lib\pc-x86_vc2005,..\..\hekkus\lib\xp-unicode (Windows desktop)
..\..\edge\lib\ppc2003-arm_vc2005,..\..\hekkus\lib\ppc-arm (Pocket PC 2003)
..\..\edge\lib\ppc2005-arm,..\..\hekkus\lib\ppc-arm (Pocket PC 2005)
..\..\edge\lib\smartphone2003-arm_vc2005,..\..\hekkus\lib\ppc-arm (Smartphone 2003)
..\..\edge\lib\smartphone2005-arm,..\..\hekkus\lib\ppc-arm (Smartphone 2005)

Then edit the installation definition file in the setup folder:

install.inf (25 lines)
  1. [DefaultInstall]
  2. CopyFiles   = ExeFiles,SndFiles
  3. CEShortcuts = Startmenu
  4.  
  5.  
  6. [SourceDisksNames.ARMPPC]
  7. 1 = ,"ExeFiles",,..\workspace_ppc2003\ARMV4Rel
  8. 2 = ,"SndFiles",,..\res
  9.  
  10.  
  11. [SourceDisksFiles]
  12. Helloworld.exe = 1
  13. hss.dll = 1
  14. sound.wav = 2
  15. music.mod = 2
  16.  
  17.  
  18. [ExeFiles]
  19. "Helloworld.exe"
  20. "hss.dll"
  21.  
  22.  
  23. [SndFiles]
  24. "sound.wav"
  25. "music.mod"

After that, edit the Symbian project files (for all Symbian platforms) to include Hekkus:

helloworld.mmp (3 lines)
  1. USERINCLUDE   ..\..\edge\include
  2. USERINCLUDE   ..\..\hekkus
  3. USERINCLUDE   ..\..\hekkus\include
helloworld.mmp (2 lines)
  1. LIBRARY hss.lib
  2. LIBRARY euser.lib
helloworld.pkg (4 lines)
  1. "helloworld.app"-"!:\system\apps\helloworld\helloworld.app"
  2. "hss.dll"-"!:\system\apps\helloworld\hss.dll"
  3. "..\res\sound.wav"-"!:\system\apps\hekkus_sample\sound.wav"
  4. "..\res\music.mod"-"!:\system\apps\hekkus_sample\music.mod"

As you can see, the setup file install.inf and the Symbian package file contain two extra files: sound.wav and music.mod.
Download sound.wav and music.mod and copy them into the res folder of the project. Copy them to the release folder of desktop pc workspaces too, for quick testing.

Finally copy the matching Hekkus .DLL files for each platform workspace/solution you may have:

  • hekkus\dll\xp\hss.dll (Windows Desktop)
  • hekkus\dll\xp-unicode\hss.dll (Windows Desktop, Visual C++ 2005)
  • hekkus\dll\ppc-arm\hss.dll (Windows Mobile)
  • hekkus\dll\symbian-armi\hss.dll (All Symbian device before Symbian 9)
  • hekkus\dll\symbian_v9-gcce\hss.dll (All Symbian 9+ devices)

Include and link Hekkus

To use the Hekkus Sound System wrapper, define ESOUND_HEKKUS before including edgemain.h:

helloworld.cpp (8 lines)
  1. //Use the ClassESound Hekkus wrapper
  2. #define ESOUND_HEKKUS
  3.  
  4. //Include EDGELIB
  5. #include "edgemain.h"
  6.  
  7. //Link the Edge static library
  8. #pragma comment(lib, "edge.lib")

Chapters

Latest forum posts