views:

22

answers:

0

Hi,

I am developing an iPad application. There are two classes D1 and D2 inheriting from same base class B. 'B' has an member variable 'm'. Both D1 and D2 are compiled as separate static libraries. When the main project tries to link to these libraries it gives duplicate symbol error for 'm'.

BFile.h @interface B { int m; } @end

D1File.h in Lib1

import "BFile.h"

@interface D1: B { } @end

D2File.h in Lib2

import "BFile.h"

@interface D2: B { } @end

Main Project tried to link to Lib1 and Lib2 and we get duplicate symbol error for 'm'

How do I solve this problem? Any code snippet will be helpful.

Thanks and regards, Deepa