Invalid arguments to strncpy() [message #1237684] |
Thu, 30 January 2014 10:12 |
Charles Smith Messages: 12 Registered: May 2011 |
Junior Member |
|
|
Hi,
Eclipse (Kepler) is driving me crazy.
The code snippet (C++ perspective) below compiles but I get red squiggly line under strncpy.
char buffer[200];
char test[] = "hello world";
strncpy(buffer, test, 4);
Invalid arguments '
Candidates are:
char * strncpy(char *, const char *, ?)
Why can't eclipse resolve this. I've included the correct header files.
I get hundreds of red lines under library function calls.
Thanks in advance for any help.
[Updated on: Thu, 30 January 2014 10:16] Report message to a moderator
|
|
|
|
|
Re: Invalid arguments to strncpy() [message #1240394 is a reply to message #1239941] |
Thu, 06 February 2014 11:02 |
Axel Mueller Messages: 1973 Registered: July 2009 |
Senior Member |
|
|
Charles Smith wrote on Wed, 05 February 2014 11:59Yes I built the index many times with no success.
I've now turned off code analysis.
Kepler seems to have more bugs than ever.
Also I noticed that even though the include paths are shown in project explorer I still get warnings that the include files can't be resolved. So what I did was to include the same include path so that it shows up twice in project explorer and that seems to resolve that issue.
strncpy() is part of the system libraries. There should be no need to manually add include paths for system headers. So I guess your project is somehow not properly configured.
The autodiscovery is described here
http://help.eclipse.org/kepler/topic/org.eclipse.cdt.doc.user/tasks/cdt_t_sd.htm?cp=9_3_7
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
|
|
|
Powered by
FUDForum. Page generated in 0.04562 seconds