LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a global fxn prototype?

Labwindows is complaining I don't have a function prototype for one of my external functions.  It's created in a separate file in the project.  Here's an exmaple of the problem I'm having.

 

main.c

#include "file.h"

 

int main()

{

     file_fxn();// Shows an error on this line saying no prototype.

     return 0;

}

file.h

#ifndef FILE_H

#define FILE_H 

void file_fxn();

 

#endif

file.c

#include "file.h" 

 

void file_fxn() {}

0 Kudos
Message 1 of 2
(3,009 Views)

You can't have an empty argument list in a prototype, you should have:

 

file.h

#ifndef FILE_H

#define FILE_H 

void file_fxn(void);

 

#endif

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 2
(3,004 Views)