12-12-2017 04:34 PM
Hello,
I'm using "C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2014-2016" to import existing code onto my NI Linux system. I'm getting the following error,
error: #error This compiler supports neither __func__ nor __FUNCTION__
My first question is... does this compiler support C++11? I could not find any documentation to claim or deny support.
Solved! Go to Solution.
12-12-2017 04:47 PM
After a little digging I learned that NI's cross compiler tools distribute GCC/G++ 4.7.2. According to (https://gcc.gnu.org/gcc-4.7/cxx0x_status.html) C++11 can be enabled using either -std=c++11
or -std=gnu++11
.
My reason in asking is the __func__
symbol is not defined. According to the reference above it is if one of the listed flags is used. However, even when I use one of these flags __func__
is still not defined/supported.
Thoughts?
12-12-2017 07:53 PM
Does your question have anything to do with LabVIEW? Because you posted in the LabVIEW forum.
12-13-2017 06:37 AM
12-13-2017 03:24 PM
My apologies for the misplacement of the question. I guess since I am using the NI cross-compiler toolchain to run on the NI LabVIEW target I naturally turned to the NI LabVIEW forum. Would this fit better under the "REAL-TIME MEASUREMENT AND CONTROL" forum?
The cross compiler provided by NI does not have __func__ defined for some reason...
12-13-2017 05:23 PM
12-14-2017 02:07 AM
Not sure how that SO post answers your question. It was the first hit I got when googling for your question. It only tells how __func__ works and how to use it. And that it's defined in C99...
And yes, the other forum might have been better (it might be less active, not sure). No biggy: your reasoning to post it here make sense. It's not the perfect place, but it's not totally OT.
12-14-2017 10:19 AM
I was not able to compile due to the issue discussed on the SO posting. I had read in some other forums that __func__ support was newly added in the g++ compiler in 4.7.x but "it wasn't working" in the NI tools... Since I'm more of a LV/NI guy I naturally look to the NI community first... and, it turns out that I posed the wrong question. Thanks anyway.