LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 8.5 __FUNCTION__ Macro missing

But then I could be wrong as to how typedefs are handled - could be it's all compiler and not the preprocessor at all.
 
Menchar
0 Kudos
Message 21 of 29
(3,141 Views)
Yes, it's the compiler, not the preprocessor. But that doesn't change the underlying issue. It should still have worked, regardless.
 
Luis
0 Kudos
Message 22 of 29
(3,137 Views)
Should this also apply to __LINE__   ???
0 Kudos
Message 23 of 29
(3,025 Views)
If by "this" you mean that in 8.5 you need to add that pragma, then the answer is no, you don't need the pragma. You should be able to use __LINE__ in any program.
 
Luis
0 Kudos
Message 24 of 29
(3,017 Views)
Somehow I just now read the very first post on this thread.   You are right.   What was I thinking?
0 Kudos
Message 25 of 29
(2,998 Views)

Ten years later...
May I use __func__, __LINE__ and __FILE__ with LabWindows/CVI 2017?

Where do I get thorough information on accepted preprocessor variables?
Do you understand that it makes no sense whatsoever to pay 3'500€ and write code with an IDE that canNOT assist you in doing so?
Do you have anything in store for the next few months?

0 Kudos
Message 26 of 29
(1,605 Views)

CVI2017 has C99 support, so all things defined by C99 (like __func__) work of course. You might need to enable C99 in the build options, not sure, I haven't done any non-C99 stuff for years.

 

All non-standard defines are listed in the "Predefined Macros" section in the help. The standard defines are unfortunately not listed, as far as I can tell.

0 Kudos
Message 27 of 29
(1,598 Views)

Hello MarcelK, and thank you for your reply that actually gave me the sting to dig a bit and find something I believe it is useful and want to share.

"The standard defines are not listed", that is sad: I have a tool and cannot be sure of how to use it.
Here:
http://www.ni.com/white-paper/14617/es/
is the last info about the LabWindows compiler: Clang3.3 (an open-source project, how interesting...)

I won't discuss the detail that Clang is now at its version 5 (a version 6 is under development). Here come the release notes of the version LabWindows uses, instead: http://releases.llvm.org/3.3/tools/clang/docs/ReleaseNotes.html and the User Manual: http://releases.llvm.org/3.3/tools/clang/docs/UsersManual.html
On the latter page I can read:

 

Clang is designed to support the C family of programming languages, which includes C, Objective-C, C++, and Objective-C++ as well as many dialects of those. For language-specific information, please see the corresponding language specific section:

 

In principle, this should settle my concerns for good, BUT...
How comes, then, that LabWindows cannot "do" (I don't know at what level this impossibility arises: editor? IDE? "apparently" not at compiler level) C++?
The reason for my question is obvious: if the problem is at compiler level, then we are given a "stripped-down" version of Clang3.3, and I don't know where to look for proper documentation for it, then. I don't know exactly what's still in and what's been taken out.
I believe that a clear statement on this should be given by NI.
MarcelK, thank you again for your reply.

0 Kudos
Message 28 of 29
(1,586 Views)

P.S.: a draft of the ANSI C99 TC3 can be found here:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

Bye!

0 Kudos
Message 29 of 29
(1,583 Views)