LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

WinBase.h Error?

I have an instrument card, along with source code supplied by the manufacturer. I wanted to use the manufacturer's self test code as part of my application startup, so I tried running their code in CVI 7.1 (which is what the code was originally developed in). I created a new project and imported their source code. When I tried to run the code in debug mode, I got the following error:
 
"WINBASE.H"(1080,6) Illegal type for symbol 'WinMain': "int function(HINSTANCE,HINSTANCE,LPSTR,int)"
 
The portion of the winbase.h file that appears to be the problem is:
 
#ifndef _MAC
int
WINAPI
#else
int
CALLBACK
#endif
WinMain
(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd
);
 
My code is as follows:

#include <stdio.h>
#include
<string.h>
#include "galahad.h"
#include <conio.h>
int main (void)
{
    int status;
    status = Init_Module_Px((usint)0, EXC_PCMCIA_MODULE);
    return 0;
}
Galahad.h is the manufacturer's supplied header file, and Init_Module_Px is a function contained within.
 
I do not understand why I am getting this WinBase.h error. I have previously tried their code in Visual C++ 2005, and I did not get this error. I wanted to compile this code in CVI 7.1, then create a DLL that I could call from Visual C++ 2005, but obviously, I can't get there if it doesn't work in CVI first.
 
Any thoughts?

Message Edited by PSciotto on 02-01-2007 01:57 PM

0 Kudos
Message 1 of 4
(4,295 Views)
Hello PSciotto
 
  pls check is the windows.h has included  in the Galahad.h? if yes pls move out and place at the top. like
 
#include "windows.h"
#include <stdio.h>
#include
<string.h>
#include "galahad.h"
#include <conio.h>
...........
 
You may deal with you problem
 
 
Gerry
0 Kudos
Message 2 of 4
(4,273 Views)

I had tried the code both with and without windows.h as the first include file. I ended up with the same error each time.

0 Kudos
Message 3 of 4
(4,264 Views)
Hi PSciotto,

Does the error occur only when you have "galahad.h" included? If so, it is difficult to determine exactly what is causing this problem without the original manufacturer's source code. Concordantly, you may need to contact them for further support on this issue.

Regards,
0 Kudos
Message 4 of 4
(4,239 Views)