CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Compile Error when using Malloc

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sambuddy



Joined: 30 Apr 2005
Posts: 1

View user's profile Send private message

Compile Error when using Malloc
PostPosted: Sat Apr 30, 2005 5:38 pm     Reply with quote

Hello All,
I am porting some code over to CCS from an AVR platform. I have found that when I port the code over using malloc
<SNIP>
rp = malloc((sizeof(FILE)));
<SNIP>
I get the following compile error

<SNIP>
*** Error 132 "C:\PROGRA~1\PICC\drivers\memmgmt.c" Line 65(34,35): STDOUT not defined (may be missing #USE RS232) In call_1 ??65535
<SNIP>

I do have a "#USE RS232" in my main header file, so I'm not sure whyit is complaining.
Any suggestions would be greatly appreciated
Regards
Sambuddy
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Apr 30, 2005 11:19 pm     Reply with quote

There's a function in memmgmt.c, called "print_list()". It has some
printf() statements in it, and that's what's causing your problem.
It looks to me as if CCS was using this function to debug their
routines and accidently left it in there. It's not called by any other
memory management functions. You can just comment it out.
densimitre



Joined: 21 Dec 2004
Posts: 45

View user's profile Send private message

PostPosted: Sun May 01, 2005 8:48 pm     Reply with quote

Hi

From help:

malloc(); Requires STDLIBM.H must be included
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group