integrating GXCore into c++ project

I have cloned the latest repo found at https://github.com/GeosoftInc/gxcore 

I have configured my VS project to read from gxcore\include, and include the wrapper header.

#include <gxcpp_geogx.h>
using namespace geosoft::gx::geogx;

If I attempt to compile at this point, I get many errors, after some tracing around, they are related to a few key areas:

gx_extern.h

#ifdef __cplusplus
__declspec(dllexport) HWND _cdecl hGetMainWnd_GEO();
__declspec(dllexport) HWND _cdecl hGetActiveMainWnd_GEO();
__declspec(dllexport) void _cdecl EnableApplicationWindows_GEO(bool bEnable);

HWND _stdcall Std_hGetMainWnd_GEO();
HWND _stdcall Std_hGetActiveMainWnd_GEO();
void _stdcall Std_EnableApplicationWindows_GEO(bool bEnable);
#endif

gxcpp_geogx.h

int32_t default(const gx_string_type& param1, GXDATPtr param2) {...}
                {
                    int32_t ret = iDefault_RGRD(
                                      gx_->pGeo, reinterpret_cast<const long*>(&handle_), param1.c_str(), reinterpret_cast<const long*>(&gx_->handle(param2)));
                    gx_->throw_on_error();
                    return ret;
                }

There is another thread in this forum pertaining to the 'default' function above, but no resolution. 

https://forum.seequent.com/discussion/1469/gxcpp-geogx-h-using-c-keyword-for-method-name-does-not-compile

Am I doing something wrong, or have I missed some step somewhere?

Thanks
Tagged:

Comments

  • Update to this. I've been able to get the examples to build in VS2019 by setting

    Configuration Properties -> General:
    Windows SDK to "10.0 (latest installed version)"
    Platform Toolset to "Visual Studio 2019 (v142)"

    and setting appropriate paths for compiler to the "include" directory and the linker to the "lib" directory.

    At this point, I am still unable to use the "gxcpp_geogx.h" wrapper in my class. By simply including in my .cpp file, I get many compilation errors.

    Any thoughts?

    thanks