Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem from system.c and main.c(problem)
Problem from system.c and main.c [message #1750753] Wed, 28 December 2016 06:53 Go to next message
Mubdiul Hasan is currently offline Mubdiul HasanFriend
Messages: 38
Registered: November 2016
Member



Hi,

Take a look this problem and suggest me what to do,


..\startup\sysmem.c:62:1: error: unknown type name 'caddr_t'
 caddr_t _sbrk(int incr)
 ^
..\startup\sysmem.c: In function '_sbrk':
..\startup\sysmem.c:75:11: error: 'caddr_t' undeclared (first use in this function)
   return (caddr_t) -1;
           ^
..\startup\sysmem.c:75:11: note: each undeclared identifier is reported only once for each function it appears in
..\startup\sysmem.c:80:19: error: expected ';' before 'prev_heap_end'
  return (caddr_t) prev_heap_end;
                   ^
..\startup\sysmem.c:66:8: warning: variable 'prev_heap_end' set but not used [-Wunused-but-set-variable]
  char *prev_heap_end;
        ^
..\startup\sysmem.c:81:1: warning: control reaches end of non-void function [-Wreturn-type]

}[/code]




Re: Problem from system.c and main.c [message #1750761 is a reply to message #1750753] Wed, 28 December 2016 09:38 Go to previous messageGo to next message
David VavraFriend
Messages: 1417
Registered: October 2012
Senior Member
You really need to learn to distinguish CDT related problems from others.
A search for "caddr_t" turns up: http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used
Try using web searches before posting questions. If nothing else, you will find resolutions faster. You should stop expecting us to do what you have admitted to being paid to do for you.

Wherever you are getting this code, it is obviously incomplete if it is referring to non-standard types without defining them. But then you may be using it in an unintended way. You really should be addressing your questions to the provider of this code or forums with the goal of addressing these types of questions. such as stackoverflow.com or stackexchange.com.






Re: Problem from system.c and main.c [message #1750792 is a reply to message #1750761] Thu, 29 December 2016 02:46 Go to previous messageGo to next message
Mubdiul Hasan is currently offline Mubdiul HasanFriend
Messages: 38
Registered: November 2016
Member

Quote:
You really need to learn to distinguish CDT related problems from others.

Give me a source to study.

Quote:
You should stop expecting us to do what you have admitted to being paid to do for you.

Nobody knows everything for sure. question I am asking would be tough or unsolicited or irrelevant to you. The reason I am asking that it might familiar with you anyhow. Besides I am seriously trying but feeling difficulties for my shortage of C knowledge !


Quote:
Wherever you are getting this code, it is obviously incomplete if it is referring to non-standard types without defining them.

Fine, you mean that who made this code might be incomplete or its not well defined ? Shocked

Quote:
But then you may be using it in an unintended way. You really should be addressing your to the provider of this code or with the goal of addressing these types of .


I must say, its a good suggestion, lets make a id there. Razz





Re: Problem from system.c and main.c [message #1750819 is a reply to message #1750792] Thu, 29 December 2016 12:02 Go to previous message
David VavraFriend
Messages: 1417
Registered: October 2012
Senior Member
Sorry if this is hurting your feelings but you need to understand that Eclipse is only an intermediary. It lets you edit files (its primary purpose); optionally builds the recipes in the make files; runs make for you when you request a build; and optionally will provide an interface with the debugger -- nothing more. It doesn't modify your code except when you deliberately edit. It doesn't cause compile errors. It doesn't compile the code. It won't cause type and class definitions to disappear.

Quote:
The reason I am asking that it might familiar with you anyhow. Besides I am seriously trying but feeling difficulties for my shortage of C knowledge !

This forum is meant for only CDT problems and specific questions about using CDT. Anything else is an abuse. The forum is not meant for teaching programming; explaining the executable build process using C/C++; explaining how to use external tools such as the compiler and linker; answering general code questions; or otherwise holding your hand. Many of your questions have been way off topic. Stop blaming Eclipse for problems with your code. Isolate the problem first. Try building without using Eclipse. Any errors you get then have nothing to do with Eclipse and you should seek resolution elsewhere.



[Updated on: Thu, 29 December 2016 12:04]

Report message to a moderator

Previous Topic:Plug-in org.eclipse.cdt.launch was unable to load class org.eclipse.cdt.launch.internal.LocalCDILaun
Next Topic:Neon.2 (4.6.2) -- Qt update not working
Goto Forum:
  


Current Time: Sat Jan 29 05:38:16 GMT 2022

Powered by FUDForum. Page generated in 0.02493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top