LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Implicit declaration of Function

I upgraded from Labwindows 2008 to 2013

 

When I now build my project in Labwindows 2013 I am getting many errors like these:

  236, 5    error: implicit declaration of function 'GPS_DisplayErrorStatistics' is invalid in C99. Make sure that you include the function prototype. [-Wimplicit-function-declaration]

  246, 5    error: implicit declaration of function 'BER_DisplayErrorStatistics' is invalid in C99. Make sure that you include the function prototype. [-Wimplicit-function-declaration]

  256, 5    error: implicit declaration of function 'NDAT_DisplayErrorStatistics' is invalid in C99. Make sure that you include the function prototype. [-Wimplicit-function-declaration]

 

No problem when I build the project using Labwindows 2008

 

errorStat.h

void GPS_DisplayErrorStatistics( int displayIfZero );

void BER_DisplayErrorStatistics( int displayIfZero );

void NDAT_DisplayErrorStatistics( int displayIfZero );

 

errorStat.c

/****************************************************************************************/
/*                                                                                                                          */
/*  Display any BER errors which may have been detected during collection     */
/*                                                                                                                          */
/****************************************************************************************/
void BER_DisplayErrorStatistics( int displayIfZero )
{
 ProcessError(BER_Stats.bytecount_errors, "Data Byte Count Errors");
 ProcessError(BER_Stats.checksum_errors, "Checksum Errors");
 ProcessError(BER_Stats.BER_errors , "BER Unreasonable Errors");
 ProcessError(BER_Stats.MSE_errors, "MSE Unreasonable Errors");
 ProcessError(BER_Stats.SNR_errors, "SNR Unreasonable Errors");

}

 

Calling function in other file

/***************************************************************************************/
/*                                                                                                                         *
/*  Analyze BER statistics                                                                                  */
/*                                                                                                                         */
/***************************************************************************************/
void AnalyzeBER( void )
{
 BER_DisplayErrorStatistics( FALSE );
}

 

 

What can be wrong?

 

Thanks!

John W.

 

0 Kudos
Message 1 of 6
(7,567 Views)

Hello jwinterb,

 

Did you include the header file where you call those functions?

 

Best regards,

= Nelu F. || National Instruments.

 

 

0 Kudos
Message 2 of 6
(7,554 Views)

Yes, the header files are included in the files.

My confusion is why does it work with Labwindows 2008 but not Labwindows 2013?

 

Thanks

JW

 

0 Kudos
Message 3 of 6
(7,543 Views)

well, one could possibly argue that the new clang compiler is more strict...?

0 Kudos
Message 4 of 6
(7,535 Views)

What do I need to do to fix it?

 

Thanks

JW

 

0 Kudos
Message 5 of 6
(7,527 Views)

Please allow me a second attempt, see here :

 

If you enable the Build with C99 extensions option, the Require function prototypes option is always implicitly enabled.

 


By the way, did you also add your include files to the project?

0 Kudos
Message 6 of 6
(7,525 Views)