Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Squall012

compiler problem with an engine

This topic is 6926 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!