%SWI_HOME_DIR% points to the installation directory of Prolog. See above for setting variables. You can also use the following before calling PL_initialise( argc, argv );
#define SWI_IMPORT _stdcall on top of the header file <return_type> _stdcall <funktions_name>( arg... ); /* everywhere needed - controllable by the linker errors */