compiler problem with an engine
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
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
Faff
Faff...URL: http://home.compsoc.com/~dflynn/index.html
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......
Good luck,
CJ
Dance with me......
http://members.xoom.com/CJdeVos/index.htm
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement