1
Discussion - Software / Re: libMPSSE: gcc returns an error
« on: August 13, 2018, 11:51:42 am »
After several attempts, I got new error messages. The message above does not seems to be triggered by 32/64bit-problem. I appreciated this cause most hints relating to this message suggest this.
I started a new project (now with MinGW) and add the sample-path in libMPSSE "LibMPSSE-SPI\samples\SPI\SPI" to the directory (project property in Netbeans IDE), also the linker path. Headerfiles are included from here.
Now the compiler returns:
The errors are linked to ftd2xx.h. If I follow the error links, I can find that:
Please, has anyone an idea what is missing or why the build fails? I don't think that there is a '=' missing, but what else is going wrong?
I started a new project (now with MinGW) and add the sample-path in libMPSSE "LibMPSSE-SPI\samples\SPI\SPI" to the directory (project property in Netbeans IDE), also the linker path. Headerfiles are included from here.
Now the compiler returns:
Quote
cd 'I:\Documents\NetBeansProjects\GettingStartedMPSSE2'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/i/Documents/NetBeansProjects/GettingStartedMPSSE2'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/gettingstartedmpsse2.exe
make.exe[2]: Entering directory `/i/Documents/NetBeansProjects/GettingStartedMPSSE2'
mkdir -p build/Debug/MinGW-Windows
rm -f "build/Debug/MinGW-Windows/main.o.d"
gcc -m32 -c -g -I/I/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI -include /I/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/WinTypes.h -include /I/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h -include /I/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/libMPSSE_spi.h -MMD -MP -MF "build/Debug/MinGW-Windows/main.o.d" -o build/Debug/MinGW-Windows/main.o main.c
In file included from <command-line>:32:0:
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:259:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_Open'
FT_STATUS WINAPI FT_Open(
^~~~~~~
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:265:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_OpenEx'
FT_STATUS WINAPI FT_OpenEx(
^~~~~~~~~
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:272:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_ListDevices'
FT_STATUS WINAPI FT_ListDevices(
^~~~~~~~~~~~~~
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:279:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_Close'
FT_STATUS WINAPI FT_Close(
^~~~~~~~
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:284:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_Read'
FT_STATUS WINAPI FT_Read(
^~~~~~~
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:292:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_Write'
FT_STATUS WINAPI FT_Write(
^~~~~~~~
i:/C-Bibliotheken/LibMPSSE-SPI/samples/SPI/SPI/ftd2xx.h:300:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FT_IoCtl'
FT_STATUS WINAPI FT_IoCtl(
^~~~~~~~
...more errors, deleted cause post lenght
make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make.exe[2]: Leaving directory `/i/Documents/NetBeansProjects/GettingStartedMPSSE2'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/i/Documents/NetBeansProjects/GettingStartedMPSSE2'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 20s)
The errors are linked to ftd2xx.h. If I follow the error links, I can find that:
Quote
#ifdef __cplusplus //<-- This is line no. 253
extern "C" {
#endif
FTD2XX_API
FT_STATUS WINAPI FT_Open( //<- This is red marked, line no. 259
int deviceNumber,
FT_HANDLE *pHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_OpenEx( //<- This is red marked, line no. 265
PVOID pArg1,
DWORD Flags,
FT_HANDLE *pHandle
);
FTD2XX_API
FT_STATUS WINAPI FT_ListDevices( //<- This is red marked, line no. 271
PVOID pArg1,
PVOID pArg2,
DWORD Flags
);
Please, has anyone an idea what is missing or why the build fails? I don't think that there is a '=' missing, but what else is going wrong?