Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Embedded > preprocessor in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 381 of 414
Post > Topic >>

preprocessor in CW 5

by double_s@[EMAIL PROTECTED] May 8, 2006 at 02:07 AM

Hi ng,

I need to specify the location of my include files in source files.
Instead of hard-coding each path, I wanted to add a #define in front
the file name which is expanded by the preprocessor before compilation.

I thought of

#define INCPATH "../foo/"

[.source file]
#include INCPATH"bar.h"

However this is exactly expanded as it occurs to: "../foo/""bar.h"
CW does not concatenate both strings automatically. Is there a way to
overcome that? There are some compilers/preprocessors that can handle
these string concatenation, hopefully CW does too.I also tried

#define INCPATH(file)  "../foo/"file

with the same result...

Hope you can help,
 




 3 Posts in Topic:
preprocessor in CW 5
double_s@[EMAIL PROTECTED  2006-05-08 02:07:25 
Re: preprocessor in CW 5
"rTrenado" <  2006-05-09 02:07:41 
Re: preprocessor in CW 5
double_s@[EMAIL PROTECTED  2006-05-10 07:49:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:50:50 CDT 2008.