Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Code Library Error #13

Closed
thetoivonen opened this issue Mar 31, 2016 · 3 comments
Closed

Example Code Library Error #13

thetoivonen opened this issue Mar 31, 2016 · 3 comments

Comments

@thetoivonen
Copy link

$ 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.

@lanyusea
Copy link
Member

aha?

@thetoivonen
Copy link
Author

Fixed my initial post, code was not displayed properly.

@janwillemm
Copy link
Contributor

Another solution is to include <cstring>, as found on stackoverflow. After including cstring the issue is also solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants