Let me preface by saying I am not a programmer. I am hoping to directly use an NI example (from their install>examples) to get certain instrument APIs working on my PC.
For reference, I am looking at an RFmx example (in this case, RFmxNRDLModAccSingleCarrier, which is a packaged example supposed to invoke modulation accuracy measurements in NR). I am picking up the C-code for this example (same-name-as-above.c). I also have the MinGW64 C compiler installed.
If I try to compile this using gcc, I get "undefined reference to ....." for all sorts of functions. For example, "undefined reference to RFmxNR_Initialize". I see that these are functions/APIs that are declared in the corresponding header file (niRFmxNR.h, which is included and present). However, they seem to be declared as C++ functions only. This is possibly the reason gcc doesn't compile.
If I switch over to g++ and try to treat the example as C++ code, it obviously doesn't work, with more compiler errors, as the example is C-code & not C++.
So, please help me understand how to get this to work. Does NI have any C++ versions of these examples? Otherwise, why doesn't the header file declare these functions/APIs using C syntax? Please forgive me if I am mis-speaking, as I am not proficient in these matters. It would be nice to have examples that work straight away. Thanks.