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 CCS Technical Support

problem in compiling ex_fat.c

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



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

problem in compiling ex_fat.c
PostPosted: Wed Dec 05, 2012 5:40 am     Reply with quote

Hi, everyone! I tried to compile ex_fat.c, but the complier returned an error:
"C:\Program Files (x86)\PICC\drivers\fat.c" Line 1867(37,41): Printf format type is invalid ::
It points to this row:
Code:

           sprintf(cur_fnum, "%u", fnum);

I`m using mplab v8.88, ccs v4.134.
Can you tell me where is the problem???
Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Wed Dec 05, 2012 6:02 am     Reply with quote

Somebody forgot to type an L at CCS.....
Line needs to be:
Code:

            sprintf(cur_fnum, "%lu", fnum);

The version with later compilers is OK.

Best Wishes
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Wed Dec 05, 2012 6:13 am     Reply with quote

Thanks!
I want to ask one more thing. In ex_fat there is a row:
Code:

#device PASS_STRINGS = IN_RAM

How can I remove this row?? I tried without it but I had an error:
*** Error 90 "ex_fat.c" Line 156(28,29): Attempt to create a pointer to a constant
and it points to if(fatopen(fileName, "a", &stream) != GOODEC)

Best regards!
Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Wed Dec 05, 2012 8:36 am     Reply with quote

Read the manual, or search here. This has been explained so many times it is obscene.....
It is one way of allowing constant strings to have pointers allocated to them. "a" is a constant string.

Best Wishes
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