LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

<built-in> <command line> macro names must be identifiers

Ooops.  Here's the screenshot.

0 Kudos
Message 11 of 19
(2,876 Views)

Hello S2rt and ichaus

 

Can you check whether you have some possibly incorrect Compiler Defines in Build Options(like in the image below)

 

Build Options.png

 

Can you post a sample project that exhibits this behavior?

Constantin

0 Kudos
Message 12 of 19
(2,853 Views)

Hello Constantin,

 

attached you will find my Build Options:

 

BuildOptions1.png

 

and

BuildOptions2.png

 

I can confirm that I do not change anything at that point when swapping between CVI2013 and CVI2012

 

0 Kudos
Message 13 of 19
(2,844 Views)

Hello ichaus,

 

If you want to define the symbol O2 you need to put /DO2 in Compiler Defines. All the defines must be preceded by /D accordint to this help topic. I can confirm that I get the same error if I put /O2.

CVI2013 has a new compiler which doesn't accept the incorrect definition. 2012 seems to just ignore it, so probably you don't need it and you can remove it.

 

Regards,

Constantin

 

 

Message 14 of 19
(2,831 Views)

Hello Constantin,

 

thats it. Good explanation and exactly faceing my problem. I removed the /O2 and restarted the development environment, then it works also with CVI2013.

Some years ago I tried the Intel Compiler for which this was a optimization flag, I suppose the old CVI just ignored it?

 

Thanks alot for the help.

0 Kudos
Message 15 of 19
(2,826 Views)

Hello ichaus,

 

I'm glad the problem was solved. I've also created a bug, ID 438833 to give more conclusive error for this situation.

Yes, it seems CVI 2012 or older ignores it. If I write

#ifdef O2
 //some code
#endif

 the code is not executed.

In CVI 2013 you can set the optimization level from Options->Build Options, Configuration Options tab -> Optimization level for release configurations

 

Constantin

Message 16 of 19
(2,822 Views)

I too had a symbol defined in the compiler options.  It started with -D rather than /D.  Removing the define removed the error.

 

Thanks, Constantin.

0 Kudos
Message 17 of 19
(2,791 Views)

Hi K_Joy.

I have the same error with all my *.c including excelreport.c (supplied by NI).

This file uses define's begining with underscore followed by a capital letter ( you said it is forbidden? ).

This file begins with:

 

/*============================================================================*/
/* L a b W i n d o w s / C V I */
/*----------------------------------------------------------------------------*/
/* Copyright (c) National Instruments 2000-2014. All Rights Reserved. */
/*----------------------------------------------------------------------------*/
/* */
/* Title: ExcelReport.h */
/* Purpose: Header file for CVI Excel Report Generation Instrument Driver */
/* Notes: This library communicates with the Microsoft Excel Automation */
/* Server via a generated ActiveX controller instrument driver */
/* (Excel2000.fp). This generated driver must be present to use */
/* this library. */
/* */
/*============================================================================*/

#include <cvidef.h>

#ifndef _EXCELREPORT_H_
#define _EXCELREPORT_H_

 

0 Kudos
Message 18 of 19
(2,115 Views)

What happens when you remove the initial underscores?

Michael Keane
National Instruments
0 Kudos
Message 19 of 19
(2,094 Views)