11-26-2013 08:51 AM
Ooops. Here's the screenshot.
11-27-2013 07:46 AM
Hello S2rt and ichaus
Can you check whether you have some possibly incorrect Compiler Defines in Build Options(like in the image below)
Can you post a sample project that exhibits this behavior?
Constantin
11-27-2013 10:55 AM
Hello Constantin,
attached you will find my Build Options:
and
I can confirm that I do not change anything at that point when swapping between CVI2013 and CVI2012
11-28-2013 01:56 AM
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
11-28-2013 04:19 AM
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.
11-28-2013 04:27 AM
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
12-02-2013 09:25 AM
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.
04-27-2015 05:04 AM
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_
04-28-2015 09:07 AM
What happens when you remove the initial underscores?