# Trouble with C Examples

**URL:** <https://techcommunity.softwareag.com/t/trouble-with-c-examples/59627>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [April 19, 2006, 11:34pm UTC](https://techcommunity.softwareag.com/t/trouble-with-c-examples/59627 "2006-04-19T23:34:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![soliver](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@soliver](https://techcommunity.softwareag.com/u/soliver)\
**Post date:** [April 19, 2006, 11:34pm UTC](https://techcommunity.softwareag.com/t/trouble-with-c-examples/59627/1 "2006-04-19T23:34:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![soliver](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@soliver](https://techcommunity.softwareag.com/u/soliver)\
**Post date:** [April 20, 2006, 8:58pm UTC](https://techcommunity.softwareag.com/t/trouble-with-c-examples/59627/2 "2006-04-20T20:58:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/trouble-with-c-examples/59627/3 "2021-04-02T14:39:57Z")

</div>


