LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

While compiling with Labwindows\cvi I get a warning: Unexpected trailing tokens on diretive line ignored.

When I click to go to the line of code that contains the error, CVI takes me to the first line of the *.c file. I get this warning for about 3 of my *.c files in my project, but not all of the .c files in my project.
0 Kudos
Message 1 of 4
(3,605 Views)
Did you try to put a comment on a directive line such as a #define line? That may cause this problem.

Perhaps you could attach the top 25 lines or so of the .c file that's giving you the problem.
0 Kudos
Message 2 of 4
(3,605 Views)
There are several causes for this warning. The most common ones are probably

a) specifying more than one file on #include

#include

The second file is ignored. Only one include file per #include is allowed.

b) specifying an identifier (from #ifdef) after #endif

#ifndef __ABC_H__
#define __ABC_H__
...
#endif __ABC_H__

__ABC_H__ after #endif is simply ignored. Write #endif /* __ABC_H__ */ instead. This usually is a problem in include files.

c) undefining several identifiers at once

#undef A B C

B and C are ignored. Only one identifier per #undef is allowed.
0 Kudos
Message 3 of 4
(3,605 Views)
I have an identical problem with my code.
I get the warning to the first line with standard include (e.g. #include ) but also if the first line is blank.

I include some lines of my code (note that the first line is blank).

Thank you.
0 Kudos
Message 4 of 4
(3,605 Views)