LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows Multiple-file compile

who can tell me why i can not compile this simple *.pro successfully,  compiler hint is missing prototype(GPS_start_test())
the progam simplely list as follow:
/******************/
GPS_main.c:
#include <userint.h>
#include <cvirte.h>
#include "GPS_test.h"
#include "GPS_main.h" 
void update()
{
 MessagePopup("GRETAT", "hello")  ;
}
int main (int argc, char *argv[])
{
 if (InitCVIRTE (0, argv, 0) == 0)
  return -1;    /* out of memory */
 update();
 GPS_start_test(); 
 return 0;
}
/************/
GPS_main.h:
#ifndef _GPS_MAIN_H
#define _GPS_MAIN_H
void update();
#endif

 
/***************/
GPS_test.c:
#include <userint.h>
#include "GPS_test.h"
 void GPS_start_test()
{
 MessagePopup("test","OK");
}
/*******************/
GPS_test.h:
#ifndef GPS_TEST_H
#define GPS_TEST_H
void GPS_start_test();
#endif
/***********/
just so simple ,but i can not compile it successfully.
 
2)another question is who can tell me which function in CVI or Windows SDK can get system time in ms unit.
 
Thank you in advance
 

 
0 Kudos
Message 1 of 3
(3,277 Views)
Hi,
1)function prototype without parameter must be func(void);
/*******************/
GPS_test.h:
#ifndef GPS_TEST_H
#define GPS_TEST_H
void GPS_start_test(void);
#endif
/***********/
GPS_main.h:
..
void update(void);

2)SDK function to get system time in ms unit
 
GetLocalTime(SYSTEMTIME *ltime)
  ltime.wDay   ;
  ltime.wMonth ;
  ltime.wYear  ;
  ltime.wHour  ;
  ltime.wMinute;
  ltime.wSecond;
  ltime.wMilliseconds;

some other useful function SystemTimeToFileTime-FileTimeToSystemTime,GetTimeZoneInformation
0 Kudos
Message 2 of 3
(3,259 Views)
Thank you for your  help, according your reply  i have solved this problem
0 Kudos
Message 3 of 3
(3,234 Views)