Skip to main content



      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 01:53 Go to next message
Eclipse UserFriend


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 04:38 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 28 December 2016 21:46 Go to previous messageGo to next message
Eclipse UserFriend
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 07:02 Go to previous message
Eclipse UserFriend
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 07:04] by 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: Sun Apr 20 23:12:53 EDT 2025

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

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

Back to the top