This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error msg: undefined reference to '_impure_ptr'


n f <yazhi_1@yahoo.com> writes:

> When I run my make command, i get this error:
> main.o: undefined reference to '_impure_ptr'
> 
> it has to do with a funtion that i send a char *msg to
> and try to print through the serial  port.
> 
> Does anyone know what's going on?

You need to show precisely what you are doing--what you are compiling
and what commands you are running.  Otherwise we are only guessing.
(At least you did include the exact error messages--thanks for doing
that.)

Guessing, I would say that you are using newlib.  I would say that
your main function refers to stdout.  But at this point my imagination
fails me.  Either you got error messages which you haven't told us
about, or something weird is going on, since the newlib libc should
define _impure_ptr.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]