11-20-2011 05:16 PM - edited 11-20-2011 05:20 PM
I'm getting no errors in my code, but for some reason I'm getting errors in the file: "unistd.h" which is in "[ndkdir]\target\qnx6\usr\include\". I'm getting 13 of them. The errors are: " 'ssize_t' in namespace 'std' does not name a type", "std::dev_t has not been declared", "std::mode_t has not been declared", and "std::ssize_t has not been declared". The others are repeats (the first one is the one that shows up the most). They're clearly related. Here is one of the lines that produces the first error: "extern _CSTD ssize_t pread64(int __filedes, void *__buff, _CSTD size_t __nbytes, off64_t __offset);". I don't know why it's doing that since I haven't modified the file.
Thanks, and sorry about the bad title.
Solved! Go to Solution.
11-21-2011 09:10 AM
Hi, Someone,
In the workspace Preferences dialog, find the "C/C++ -> Code Analysis" preference page and uncheck all of the "Semantic and Syntax" problems.
HTH,
Christian
11-21-2011 09:31 AM - edited 11-21-2011 09:39 AM
-removed-
Nevermind that... that was a bit stupid actually... Somehow I managed to delete one of my files which caused unhelpful errors. Now I'm just getting undefined reference to `strt' errors and things like that. Any ideas regarding that? :s
11-21-2011 09:39 AM
An executable application must have a main function. The linker can't produce your binary unless some object file supplies a main. This would not be related to adding the math library; it's just that adding the math library allowed the linking process to get to the point of trying to generate the final linked binary.
BTW, rather than add "-lm" to the Extra Linker Options, you should instead add "m" to the Libraries option. This tells the IDE explicitly that your application requires libm, which may enable other related tooling features. With just "-lm", the IDE won't know the meaning of the setting. (I'm assuming that you have a managed-build project, not a makefile project)
Cheers,
Christian
11-21-2011 09:52 AM