Search code examples
c++web-serviceswsdlgsoap

macro definitions in gSoap


Does anyone know if and/or how you can define macro definitions in a gSoap header file?

In C++ I can do:

 #define maxRecords 100

Can I do anything similar in gSoap?


Solution

  • You're not supposed to ever modify header files from packages (unless you've copied them locally and know what you're doing). You can add that define to your main .cpp file before you include anything else and it'll have the same effect. Better yet, create your own global.h, put your #define in there, and include it anywhere you include gSoap.

    You can even make it a gSoap wrapper by putting the gSoap #include within your global.h and just #include global.h instead of #include <whatevergsoapiscalled.h>