High-Speed Digitizers

Showing results for 
Search instead for 
Did you mean: 

Compile NI-SCOPE C code examples outside Visual Studio - GNU make / GCC / Eclipse ?



I'm trying to compile and run the examples for the NI-SCOPE package (https://www.ni.com/pt-br/support/downloads/drivers/download.ni-scope.html#460233). Ideally I would want to use eclipse or a GNU makefile for the projects and don't depend on Visual Studio. So I saw there was a Makefile in there, and after some tries find out that this is a nmake file. I was able to build and run after installing Visual Studio C++ and run nmake as suggested here (https://forums.ni.com/t5/High-Speed-Digitizers/Makefile-error-quot-missing-separator-quot-preventing...). I was also able to build it when creating manually a new project within Visual Studio (https://www.ni.com/docs/en-US/bundle/ni-scope/page/digitizers/creating_an_application_with_visual_c....).


So I want some support if is possible to compile this without the need of nmake/visual studio. I tried to create a project on eclipse using mingw, but it fails when generating the object files. Tried also to create a GNU makefile calling GCC and got to the same error point. I'm not much knowledgeable on C so it might have to do with it too.


Example for the error which is trying to build the common dependency object first (asciiPlot.c, I tried to keep the flags from nmake but there are many I didn't find out what were doing):

gcc -c -I "C:\Program Files (x86)\IVI Foundation\IVI\\Include" -I "C:\Program Files (x86)\IVI Foundation\VISA\\WinNT\include" -I ..\common -D "WIN32" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -D _CRT_SECURE_NO_DEPRECATE -L"C:\Program Files (x86)\IVI Foundation\IVI\\Lib_x64\msc" -lniScope.lib "../common/asciiPlot.c"
In file included from c:\program files (x86)\ivi foundation\ivi\include\ivi.h:24,
from c:\program files (x86)\ivi foundation\ivi\include\niscope.h:17,
from ../common/asciiPlot.h:4,
from ../common/asciiPlot.c:1:
c:\program files (x86)\ivi foundation\ivi\include\IviVisaType.h:64:29: error: expected '=', ',', ';',
asm' or '__attribute__' before 'ViUInt64'
64 | typedef unsigned __int64 ViUInt64;
                                              | ^~~~~~~~
c:\program files (x86)\ivi foundation\ivi\include\IviVisaType.h:65:29: error: expected '=', ',', ';',
asm' or '__attribute__' before 'ViInt64'
65 | typedef _VI_SIGNED __int64 ViInt64;
c:\program files (x86)\ivi foundation\ivi\include\IviVisaType.h:90:9: error: unknown type name 'ViUInt64'
90 | typedef ViUInt64 _VI_PTR ViPUInt64;

(Error continues for other defined types)


Is there anything that is missing here to compile it?

0 Kudos
Message 1 of 1