Using gSoap in a Cascades C++ project. For Developer on Windows

by Developer on ‎07-02-2014 02:36 PM (815 Views)

gSOAP is an open source C and C++ software development framework for SOAP/ XML.


This article demonstrates how to use gSoap in a Cascades™ C++ project. In order to do so, we will need to build the gSOAP LIB with BlackBerry® 10 Native SDK.



The instructions for compiling the gSOAP LIB for QNX/ARM on *nix and MAXOSX werementioned here:

I give big thanks to this article as a base for my article.



So I will give the instruction for Windows Developer. (From this post,


My instruction use CygWin to build and were tested with gSOAP 2.8.14



  1. Prepare the environment.
    • Download and Install Cygwin, remembering to install gcc, g++, make, automake, autoconfigure, byacc, and flex when installing Cygwin.
    • Start CygWin
    • Set up the environment
      source  /cygdrive/<your bbndk install drive>/<path to bbndk>/bbndk/
    • For example, if you install bbndk at C:\bbndk, you should exec this command
      source  /cygdrive/c/bbndk/
  2. Define C preprocessor flags to enable SSL/ZIP/COOKIES support

     Please refer the readme within the gsoap source package if you wish to enable or disable other features.

  3.  Change Directory to your gSOAP source code folder
    • I recommend you put your source code at your home folder of your CygWin user, in the path /home/<User>
    • Change the folder using the cd command, file path is in the format /cygdrive/<drive letter>/path/to/src/folder
  4. Configure the build target to be a BlackBerry® 10 device and specify where to install the generated LIBs
    ./configure --host=arm-unknown-nto-qnx8.0.0eabi --prefix=/<path>/<to>/<install>/libgsoap
    Note: when this article was written, the QNX tool chain bundled with Native SDK was at version 8.0.0. You may need to adjust it accordingly if you have a different version of QNX tool chain.
  5.  Build the gSoap LIBs.
    make | make install

    There will be errors indicating that it cannot launch “soapcpp2”, which is expected, since the generated “soapcpp2” is targeted for QNX/ARM.

    The gSoap build script tries to use this tool to compile files for building another tool “wsdl2h”, which, fortunately, we don’t need either.

    Note: “soapcpp2” and “wsdl2h” are the tools needed for generate C/C++ stub. The gSoap source package already contains the prebuilt executables for Mac, Linux and Windows, which can be located under


    Everything we need is located at:


    The header we need is located in the include folder of that folder; the lib we need is located in the lib folder; all the extensions are located in the share folder.

    There will be 6 libs:








    The libs with name containing “++”  are C++ libs.