I've got a DLL that I've created as a C++ Win32 application. To prevent name mangling in my DLL, I have used the EXPORT definition defined below:
#ifndef EXPORT
#define EXPORT extern "C" __declspec(dllexport)
#endif
EXPORT int _stdcall SteadyFor(double Par[], double Inlet[], double Outlet[]);
To get this code to compile, I had to go into the project's Properties and set the C/C++ Calling Convention
to __stdcall (/Gz) and set Compile As
to Compile as C++ Code (/TP).
This worked in Debug mode, but Release mode is throwing error C2059: syntax error: 'string'
on all of my EXPORT functions - even though I have configured the Release mode settings to be the same as the Debug settings.
How do I get Release Mode to compile?
Regards,
~Joe
(Developing under Visual Studio 2008 Professional)
EDIT:
A lot of comments about my #define, which does not appear to be causing any problems.
To eliminate the confusion, my header file has been rewritten as follows:
#ifndef coilmodel_h
#define coilmodel_h
extern "C" __declspec(dllexport) int _stdcall steadyFor(double Par[], double Inlet[], double Outlet[], char* FileIn, char* FileOut);
#endif
That is all of it.
The error is:
Description error C2059: syntax error: 'string'
File coilmodel.h
Line 4
Again, this error only appears in Release mode, not Debug mode.
Project is a C++ Win32 DLL application.