Well, let me deliver more details. It is a very simple CIN. Its source
code is:
/************************************************/
// mult.cpp : Defines the entry point for the DLL application.
//
/*
* CIN source file
*/
#include "extcode.h"
#include "hosttype.h"
#include "StdAfx.h"
CIN MgErr CINRun(float *a, float *b, float *a_b);
CIN MgErr CINRun(float *a, float *b, float *a_b) {
/* ENTER YOUR CODE HERE */
*a_b = *a * *b;
return noErr;
}
/*************************************/
Where "CIN" "MgErr" "CINRun" are supposed to be defined in "extcode.h"
plus "hosttype.h", both provided by LabVIEW. And all of codes except the
line "*a_b=*a * *b;" are automatically generated by LabVIEW. This simple
project also includes resource file
s: cin.obj, lvsb.lib, labview.lib,
lvsbmain.def, all provided by Labview. Now let's see the error
information:
/*******************
error C2146: syntax error : missing ';' before identifier 'MgErr' error
C2501: 'CIN' : missing storage-class or type specifiers fatal error C1004:
unexpected end of file found
****************/
Obviously, the errors are produced in the following line:
CIN MgErr CINRun(float *a, float *b, float *a_b);
My thought is VC++ might not understand "CIN" stuffs for some reasons.
But you know, I just follow the LabVIEW mannual step by step. Is there
any more enviroment variables necessary to be adjusted?
Any more details I shoud post?
I'll appreciate your time and kindness.
GC