Jump to content
  • Advertisement

Archived

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

Sfpiano

Linking Errors Galore...

This topic is 5736 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

22 Linking errors, all involving redefinations ex: "struct IDirectDrawSurface7 * lpDDSBackground" (?lpDDSBackground@@3PAUIDirectDrawSurface7@@A) already defined in block.obj Yet I look in that file, and don''t see how it could already be defined. http://sfpiano.netfirms.com/tetris.zip

Share this post


Link to post
Share on other sites
Advertisement
I tend to get that problem when I''m not using pre-compiled headers and have to use
#define INITGUID
Could be something to do with that, anyway basically it''s to do with the DirectX header files


OMG. It''s him again. Call the SHRINK!!!
rambo_bones@hotmail.com
WebSite: http://www.illicitdev.net/~rambobones
GlRott Page: http://www.glrott.tk

Share this post


Link to post
Share on other sites
My guess is you have a line such as:

LPDIRECTDRAWSURFACE7 lpDDSBackground;

declared in a header (.h) file which means that each source code file (.cpp, .c) which includes that header file declares a new instance of that variable with the same name as another.

Don''t do that in header files.
Put the "LPDIRECTDRAWSURFACE7 lpDDSBackground;" in *ONE* source code (.cpp, .c) file *ONLY*, and then in the header file change the line to:

extern LPDIRECTDRAWSURFACE7 lpDDSBackground;


Ufortunately this is all just a guess because when I go to http://sfpiano.netfirms.com/tetris.zip which I presume is the source code I get a graphic from that server which says "requested file exceeds 256KB". I expect your server has a single file size limit.

Since you just need help fixing this problem rather than extensive testing etc, delete any data from the .zip and don''t zip up anything from the Debug/Release folders or the .NCB or .PCH files, MSVC will recreate those for anyone downloading your project.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Ok, thanks. I''ll try that stuff. In the meantime, I got the filesize down to 13kb so it should work now. (I had a large bmp for my background so I just changed it to a black picture)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!