Codewarrior for MacOSX warning msgs

S

Sean Bartholomew

even though my code works and everything i keep getting these annoying
messages.
can anyone help?

Path for the user defined root 'CT_INSTALL' cannot be found ''

Warning : illegal multi-line string constant
AddFans.cp line 343 char *start1 = strstr(start, "
First Name="); //this one is due to the fact that for the life of me
i cant get strstr to recognize a '\r'


Link Warning : ignored 'tolower' (code) in MSL_All_Mach-O_D.lib
Previously defined in AddFans.cp

Link Warning : ignored '__fpclassifyd' (code) in MSL_All_Mach-O_D.lib
Previously defined in AddFans.cp
 
C

Chad J McQuinn

even though my code works and everything i keep getting these annoying
messages.
can anyone help?

Path for the user defined root 'CT_INSTALL' cannot be found ''

These messages have little to do with c++, except for the next one, so
you should probably post to comp.sys.mac.programmer.<something>

For the first one above, you have defined a source tree named
"CT_INSTALL" and the path that has been specified can not be found. Go
to Edit->Preferences->Source Trees to examine it.
Warning : illegal multi-line string constant
AddFans.cp line 343 char *start1 = strstr(start, "
First Name="); //this one is due to the fact that for the life of me
i cant get strstr to recognize a '\r'

C/C++ do not allow multiline string literals, hence the warning. I don't
know what you mean when you say that strstr won't recognize the \r
escape.

-Chad
 
T

tom_usenet

even though my code works and everything i keep getting these annoying
messages.
can anyone help?

Path for the user defined root 'CT_INSTALL' cannot be found ''

Warning : illegal multi-line string constant
AddFans.cp line 343 char *start1 = strstr(start, "
First Name="); //this one is due to the fact that for the life of me
i cant get strstr to recognize a '\r'

You aren't allowed newlines in string literals. Perhaps you want to
search for '\n'. When reading in files in text mode, perhaps \r is
converted to \n.

Tom
 
S

Sean Bartholomew

ur a genius Tom
thanks


tom_usenet said:
You aren't allowed newlines in string literals. Perhaps you want to
search for '\n'. When reading in files in text mode, perhaps \r is
converted to \n.

Tom
 
R

Robbie Hatley

Sean Bartholomew said:
i keep getting these annoying messages. can anyone help?

Perhaps. I can certainly help you with THIS one:
Warning : illegal multi-line string constant
AddFans.cp line 343 char *start1 = strstr(start, "
First Name=");

Use this:

char *start1 = strstr(start, "First Name=");

instead of this:

char *start1 = strstr(start, "
First Name=");

If you really do need to break a string literal
accross two or more lines, end all but the last
line with '\', like so:

std::cout << "Now, after eating three large, ripe, red \
tomatos, she was finally satiated, and was looking for \
a long, tall, cool drink to quench her thirst.";


--
Cheers,
Robbie Hatley
Tustin, CA, USA
email: lonewolfintj at pacbell dot net
web: home dot pacbell dot net slant earnur slant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top