LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI can not compile a simple code

Solved!
Go to solution

Hi all!

It is looks funny but LabWindows/CVI-9.1.0(427) can not compile a simple C-code  :smileyvery-happy:

 

 

xml.h

void f();

 

xml.c

#include "xml.h"

typedef struct
{
    int bar;

} foo;

void f()
{
    int baz=0;
    if(!baz) baz=1;
    foo foop;
    return;
}

0 Kudos
Message 1 of 5
(3,530 Views)
Solution
Accepted by topic author kolan

It's not a bug, you're doing an in-block declaration of a variable foop which isn't allowed in ANSI C89.

 

You can enable C99 extensions with a pragma if you want this to work in CVI 9.1

 

Menchar

0 Kudos
Message 2 of 5
(3,527 Views)
Yes, I've found... Thanks, now it works!
Message Edited by kolan on 02-26-2010 10:28 AM
0 Kudos
Message 3 of 5
(3,523 Views)

Hi Kolan,

 

you might want to mark the thread as solved if your initial problem has been solved as you indicate. You might even want to consider donating a little kudo to menchar for kind assistance 🙂 

 

Wolfgang

0 Kudos
Message 4 of 5
(3,518 Views)
vielen Dank, Wolfgang.
0 Kudos
Message 5 of 5
(3,514 Views)