Example Code Library Error
thetoivonen opened this issue · comments
$ make -f Makefile_noOpenCV
g++ -g -Wall -I/usr/local/include -I../../../include -c main.cpp DJI_utility.h main.cpp: In function ‘std::ostream& operator<<(std::ostream&, e_sdk_err_code)’: main.cpp:52:30: error: ‘strcpy’ was not declared in this scope main.cpp: In function ‘int main(int, const char**)’: main.cpp:230:6: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] make: *** [main.o] Error 1
In Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp
Line 2 reads: #include <string>
and must be changed to: #include <string.h>
for program to compile correctly.
aha?
Fixed my initial post, code was not displayed properly.
Another solution is to include <cstring>
, as found on stackoverflow. After including cstring the issue is also solved