I am following the DataPort example from ilogix to read out a StateMate project. I copied & pasted the given example, but it does not work. The source looks like this:
FONT=Courier New#include "C:/I-Logix/stmm/4.1/include/dataport.h"
int status, success;
printf ("Enter name of Statemate project: ");
scanf ("%s", name);
printf ("Enter directory pathname for your Workarea: ");
scanf ("%s", dir);
success = COLOR=Redstm_init_uad (name, dir, automatic_transaction, &status);[/COLOR]
printf ("Init function failed. Reason: status code %d", status);
The compiler error is:
FONT=Courier Newmain.c(14): error C2197: 'stm_init_uad' : too many arguments for call through pointer-to-function[/FONT]
Does anyone have an idea? I would really appreciate it!
Have you defined the required environment variable DLL_LINK
to use the right function declaration under WINDOWS?
This topic has been locked.
2 replies Latest Post - 2010-06-20T20:09:06Z by GertW
Pinned topic Compiling DataPort Example with MS Visual Studio
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-06-20T20:09:06Z at 2010-06-20T20:09:06Z by GertW
Bondbest 27000386AG1 Post
GertW 2700020C7Y29 PostsACCEPTED ANSWER
Re: Compiling DataPort Example with MS Visual Studio2010-06-20T20:09:06Z in response to SystemAdminI do not have a problem running this sample, using Visual Studio 6.0 and .Net 2003 on WinXP. Other compilers are not supported by Statemate.
cl -Zi -c my_prog.c /DDLL_LINK
link my_prog.obj dataport.lib /out:my_prog.exe
I set all environment variables in a batch file that are defined in run_stmm.bat and vcvars32.bat.
Then I compile and run the dataport program from command line.
Just type in
nmake -f makefile
It generates a my_prog.exe.