Hello edge,
i have downloaded the ingestion-sdk-c-master to generated CBOR data file but when compile main.c file GCC throw error that #include “qcbor.h” file not found, also I searched in ngestion-sdk-c-master directory but I can’t file this file.
Kindy tell me where do I get new SDK with qcbor.h or only file
I have updated all the required source file from Git link and followed the instruction as mentioned.
But still go below error while executing make file , I’m using gcc compiler to build the CBOR data file.
C:\Users\vikas.burhanpure\Desktop\Personal\ingestion-sdk-c-master>mingw32-make
cc -DEI_SENSOR_AQ_STREAM=FILE -Wall -I. -Imbedtls/include -Imbedtls/crypto/include -IQCBOR/inc -IQCBOR/src -Iinc -Iinc/signing test/main.c QCBOR/src/.c mbedtls/library/.c -o ingestion-sdk-example
process_begin: CreateProcess(NULL, cc -DEI_SENSOR_AQ_STREAM=FILE -Wall -I. -Imbedtls/include -Imbedtls/crypto/include -IQCBOR/inc -IQCBOR/src -Iinc -Iinc/signing test/main.c QCBOR/src/.c mbedtls/library/.c -o ingestion-sdk-example, …) failed.
make (e=2): The system cannot find the file specified.
Makefile:15: recipe for target ‘build’ failed
mingw32-make: *** [build] Error 2
Thanks Janjong for your reply.
I had tried new makfile frm git and tried above commands , I got below error related to "gmtime_s’ reference. I also seen that u added some command related to Windows_NT , but I am using Windows_10 OS. that is why I’m getting issue?
C:\Users\vikas.burhanpure\Desktop\Personal\ingestion-sdk-c-master>mingw32-make CC=gcc
gcc -DEI_SENSOR_AQ_STREAM=FILE -Wall -I. -Imbedtls/include -Imbedtls/crypto/include -IQCBOR/inc -IQCBOR/src -Iinc -Iinc/signing test/main.c QCBOR/src/.c mbedtls/library/.c -o ingestion-sdk-example
mbedtls/library/platform_util.c: In function ‘mbedtls_platform_gmtime_r’:
mbedtls/library/platform_util.c:110:15: warning: implicit declaration of function ‘gmtime_s’; did you mean ‘gmtime’? [-Wimplicit-function-declaration]
110 | return( ( gmtime_s( tm_buf, tt ) == 0 ) ? tm_buf : NULL );
| ^~~~~~~~
| gmtime
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x24): undefined reference to WSAStartup@8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xda): undefined reference to getaddrinfo@16’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x11f): undefined reference to socket@12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x15e): undefined reference to connect@12’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x17b): undefined reference to closesocket@4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x1a3): undefined reference to freeaddrinfo@4’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x240): undefined reference to getaddrinfo@16' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x285): undefined reference to socket@12’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x2d9): undefined reference to setsockopt@20' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x2ed): undefined reference to closesocket@4’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x31f): undefined reference to bind@12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x333): undefined reference to closesocket@4’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x35a): undefined reference to listen@8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x36e): undefined reference to closesocket@4’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x3a1): undefined reference to freeaddrinfo@4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x3b4): undefined reference to WSAGetLastError@0’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x40e): undefined reference to getsockopt@20' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x45a): undefined reference to accept@12’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x4b2): undefined reference to recvfrom@24' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x4c3): undefined reference to WSAGetLastError@0’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x531): undefined reference to connect@12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x582): undefined reference to getsockname@12’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x5a9): undefined reference to socket@12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x5ed): undefined reference to setsockopt@20’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x61f): undefined reference to bind@12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x6fd): undefined reference to ioctlsocket@12’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x72d): undefined reference to ioctlsocket@12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x7ab): undefined reference to __WSAFDIsSet@8’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x822): undefined reference to __WSAFDIsSet@8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x8c5): undefined reference to select@20’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x909): undefined reference to __WSAFDIsSet@8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x935): undefined reference to __WSAFDIsSet@8’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x9a9): undefined reference to recv@16' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0x9d0): undefined reference to WSAGetLastError@0’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xa55): undefined reference to __WSAFDIsSet@8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xae6): undefined reference to select@20’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xb04): undefined reference to WSAGetLastError@0' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xb70): undefined reference to send@16’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xb97): undefined reference to WSAGetLastError@0' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xbd6): undefined reference to shutdown@8’
c:/mingw/bin/…/lib/gcc/mingw32/9.2.0/…/…/…/…/mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\cc3H3WfM.o:net_sockets.c:(.text+0xbe6): undefined reference to closesocket@4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VIKAS~1.BUR\AppData\Local\Temp\ccg8lCPu.o:platform_util.c:(.text+0x39): undefined reference to gmtime_s’
collect2.exe: error: ld returned 1 exit status
Makefile:19: recipe for target ‘build’ failed
mingw32-make: *** [build] Error 1
@vikas you need MinGW-W64. gmtime_s error shows when you have the 32-bit version (very confusing, I know). If you get it from this link you should get the right one.
Bingo…:Still your smart that issue got resolved now with that updated makefile.
BTW Happy new year 2021 to all Edge Impulse team , you guys are doing great support to do some Edge AI stuff.