compiler problem with an engine

Started by
1 comment, last by Squall012 23 years, 11 months ago
I''m using an engine to help me do some 16 bit bitmap loading, and it causes this error: Linking... working.obj : error LNK2005: "struct _DDBLTFX ddbltfx_mirrored" (?ddbltfx_mirrored@@3U_DDBLTFX@@A) already defined in gpdumb3.obj Debug/Working Title.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. how in the world can i prevent this without doing the /FORCE because i can''t load bitmaps when i /FORCE it
Advertisement
It looks like you have a structure of the same name defined in gpdumb3. Maybe if you try changing the name of the structure, it might work.

Faff
If you only have one struct, then there''s this big chance that you are including the same file twice. The problem here is that when the compiler compiles, you will get 2 of the same objects, thus getting confused by getting it together (linking). One way around this is to use extern. The extern means that in all the files which include the same header will have a reference to that one object, which is (in real) defined in one of the cpp files. So try using the extern keyword before the struct.....and in the file where you initiliaze the object you put the same but without the extern keyword.

Good luck,
CJ

Dance with me......

http://members.xoom.com/CJdeVos/index.htm

This topic is closed to new replies.

Advertisement