LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

error: expected ')'

Hello,

I have just installed CVI 2015 SP1 and I am trying to compile a CVI 8.5.1 project but I get a lot of "error: expected ')'" errors. For instance here:

BOOL LEM_502A_Init ()
{ 
    if (!Init ())
    {
        return FALSE;
    }
    
    // Initialization of main frame.
    if (!LEM_502A_Display_Init (FINAL_FRAME_PANEL))
    {
        return FALSE;
    }
    
    // Initialization of Golden Device frame.
    if (!LEM_502A_Display_Init (GOLDEN_DEVICE_PANEL))
    {
        return FALSE;
    }
    
    // Initialization of maintenance frame.
    if (!LEM_502A_Display_Init (MAINTENANCE_PANEL))
    {
        return FALSE;
    }
    
    Application_SetMode (AUTOMATIC_MODE); 
    
    return TRUE;
}

I get this error on each return FALSE; line. I tried adding brackets as in return (FALSE); but it makes no difference. Any idea?

 

Thanks.

0 Kudos
Message 1 of 9
(4,117 Views)

#define FALSE 0

0 Kudos
Message 2 of 9
(4,098 Views)

Thanks, obvious actually, I understood just after I posted. Still it is defined in a .h file and it worked before, I cannot figure out what I have broken...

0 Kudos
Message 3 of 9
(4,096 Views)

TRUE and FALSE are defined in several files in CVI environment: e.g. the Programmer's Toolbox (toolbox.h) or minwindef.g which is included after including windows.h

The actual file this element is included into in the original project, if CVI 8.5.1 is still available, can be found by pressing Ctrl+I on the keyword (or Right-click + Go to definition)



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 9
(4,089 Views)

I have already tried Ctrl + I, it does not find corresponding the header file. I have just tried reopenenig the workspace and compiled it with 8.5.1 -> it works... I shoud probably check the build settings, but I do not know where to start.

0 Kudos
Message 5 of 9
(4,087 Views)

If it can be compiled and linked, then in CVI8.5 Ctrl+I must find the definition of TRUE and FALSE



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 9
(4,082 Views)

Well it is weird, when I do Ctrl + I in 8.5.1 it leeds me to a line in an other .c file that has this include instruction: #include <utility.h> I have never seen this behaviour before. I checked in utility.h and it does not define TRUE or FALSE.

On the other hand I have found 2 .h files in my project that define TRUE/FALSE. I really do not see what is wrong or why it worked in 8.5.1.

Thanks for your answers.

0 Kudos
Message 7 of 9
(4,079 Views)

When I'm in such troubles that I cannot understand what's happening in compilation I try deleting the cvibuild.something folder and the .cdb and .exe files created in debug compile, then recompile the project and retry: maybe this can fox your problems and lead you to actual TRUE/FALSE definition.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 8 of 9
(4,060 Views)

I had already tried deleting the .cvibuild folder, with no positive result. I tried the other files you told me but it is still the same. I have opened a support request with NI, I will post here when I have a solution.

Thanks for your time, have a nice week-end.

0 Kudos
Message 9 of 9
(4,050 Views)