Trouble with C Examples

I compile the supplied Dexample.c and Example.c code giving me Dexample.dll and Example.ddl. I successfully start the server.

When I run the supplied client.exe I get the following:

10050031 ERXUnmarshal() failed for EXAMPLE/HELLO.
10010023 Stub parameter definition error. Location of wrong Parameter is 1.
10050044 ERXDynDispatch() failed.
10010023 Stub parameter definition error. Location of wrong Parameter is 1.

When I start the server using the supplied pre-compiled dlls the client.exe works fine.

I am runnning under Windows 2000 and am using Visual Studio 2003 to compile. Below are my command line parameters:

/O2 /I “C:....\Examples\C\CentX\Include” /I “C:..\Software AG\EntireX\Include”
/D “WIN32” /D “NDEBUG” /D “_WINDOWS” /D “EXAMPLE_EXPORTS”
/D “_WINDLL” /D “_MBCS” /FD /EHsc /MD /GS
/Fo"Release/" /Fd"Release/vc70.pdb" /W3 /nologo /c /Wp64 /Zi /Gz /TC

Any suggestions on what I am doing wrong?

I found my problem. I used /Gz which compiles as _stdcall. When I changed to /Gd which compiles as _cdecl everything works.