R
Rahul
Hi Everyone,
I have the following files,
file.h
typedef struct
{
int data;
#if (MACRO == 1)
int net_data;
#endif
} Object;
file1.cpp
#include "file.h"
uses object.data and object.net_data (under MACRO cc)
file2.cpp
#include "file.h"
uses object.data and object.net_data (under MACRO cc)
When i compile the file1.cpp it compiles fine without any errors,
however the file2.cpp gives an error saying
"C2363E: member net_data not found in struct object"
Note 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)...
Has anyone faced similar situation? I have no clue as to how to fix
the problem?
Thanks in advance !!!
I have the following files,
file.h
typedef struct
{
int data;
#if (MACRO == 1)
int net_data;
#endif
} Object;
file1.cpp
#include "file.h"
uses object.data and object.net_data (under MACRO cc)
file2.cpp
#include "file.h"
uses object.data and object.net_data (under MACRO cc)
When i compile the file1.cpp it compiles fine without any errors,
however the file2.cpp gives an error saying
"C2363E: member net_data not found in struct object"
Note 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)...
Has anyone faced similar situation? I have no clue as to how to fix
the problem?
Thanks in advance !!!