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 > C++ > Re: compilation...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 10 Topic 45793 of 46738
Post > Topic >>

Re: compilation error with CC

by tragomaskhalos <dave.du.vergier@[EMAIL PROTECTED] > May 7, 2008 at 10:00 AM

On May 7, 1:24=A0pm, Rahul <sam_...@[EMAIL PROTECTED]
> wrote:
> Hi Everyone,
>
> =A0I have the following files,
>
> =A0file.h
>
> =A0typedef struct
> =A0{
> =A0 int data;
> #if (MACRO =3D=3D 1)
> =A0 int net_data;
> #endif
> =A0} Object;
>
> =A0file1.cpp
>
> #include "file.h"
> uses object.data and object.net_data (under MACRO cc)
>
> =A0file2.cpp
>
> #include "file.h"
> uses object.data and object.net_data (under MACRO cc)
>
> =A0When i compile the file1.cpp it compiles fine without any errors,
> however the file2.cpp gives an error saying
>
> =A0"C2363E: member net_data not found in struct object"
>
> =A0Note that the macro is set to 1 before compilation of these two
> files... I'm not able to figure out as to why the file.h is expanded
> (with MACRO as 0) and file2.cpp is expanded (with MACRO as 0)...
>
> =A0 Has anyone faced similar situation? I have no clue as to how to fix
> the problem?
>

Your compiler will most likely have an option to dump the
preprocessor output to a file (it's -P or -E for MSVC I think);
find out what it is for your compiler, compile using said option
and have a look at the files produced. This should give you
a clue as to what's going on.
 




 10 Posts in Topic:
compilation error with CC
Rahul <sam_cit@[EMAIL   2008-05-07 05:24:44 
Re: compilation error with CC
"Victor Bazarov"  2008-05-07 08:36:54 
Re: compilation error with CC
Rahul <sam_cit@[EMAIL   2008-05-07 05:43:34 
Re: compilation error with CC
"Victor Bazarov"  2008-05-07 08:48:15 
Re: compilation error with CC
Rahul <sam_cit@[EMAIL   2008-05-07 05:55:31 
Re: compilation error with CC
"Victor Bazarov"  2008-05-07 10:19:04 
Re: compilation error with CC
Ron Natalie <ron@[EMAI  2008-05-07 10:25:49 
Re: compilation error with CC
"Victor Bazarov"  2008-05-07 10:31:07 
Re: compilation error with CC
tragomaskhalos <dave.d  2008-05-07 10:00:46 
Re: compilation error with CC
James Kanze <james.kan  2008-05-09 02:31:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed Jul 9 0:25:42 CDT 2008.