Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

LabWindows 2015 - Constant definition conflict

$
0
0

Hello,

 

Below is the description of the problem:

 

TXMAIN.C:

#include <txengine.h>

double measurement;

measurement = NULL;

 

TXENGINE.H:

#ifndef NULL
#define NULL 0
#endif

 

\CVI2015\include\clang\3.3\stddef.h:

#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# define NULL 0
# endif
#else
# define NULL ((void*)0)
#endif

 

TXMAIN.C and TXENGINE.H is part of the project file. The NULL in TXMAIN.C file doesn't take its definition from TXENGINE.H (which is included in the project file) but takes it from STDDEF.H giving an error: assigning to 'double' from incompatible type 'void* '.

 

Why doesn't it take its definition from the header file included in the project file? Is there any priority change which causes it to link the constant to stddef.h instead of txengine.h.

 

Please help with your inputs.

 

Regards,

Abinaya

 

 


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>