Jump to content
  • Advertisement
Sign in to follow this  
ov3r_dr1v3

error C2371

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

Hey... fo some reason, whenever i try to compile my program i keep getting this error now... 1>------ Build started: Project: game, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>c:\documents and settings\user\my documents\visual studio 2005\projects\game\game\tgaload.h(38) : error C2371: 'tgaHeader_t' : redefinition; different basic types 1> c:\documents and settings\user\my documents\visual studio 2005\projects\game\game\tgaload.h(38) : see declaration of 'tgaHeader_t' 1>c:\documents and settings\user\my documents\visual studio 2005\projects\game\game\tgaload.h(44) : error C2371: 'image_t' : redefinition; different basic types 1> c:\documents and settings\user\my documents\visual studio 2005\projects\game\game\tgaload.h(44) : see declaration of 'image_t' 1>Build log was saved at "file://c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\game\game\Debug\BuildLog.htm" 1>CMPS2E21 - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I have absoltly no idea why, because i have changed nothing at all in these files.. If anyone could help me out id be reallt grateful

Share this post


Link to post
Share on other sites
Advertisement
Hmm, are you using include guards in all your headers?
Did you write those definitions yourself or are you just using them?
Did you define 'tgaheader_t' and 'image_t' somewhere else?

Share this post


Link to post
Share on other sites
These might be the cause:

1) tgaHeader_t is defined twice in your project

2) tgaload.h is included twice somehwere and it doesnt have something like:

#ifndef TGA_LOAD_H
#define TGA_LOAD_H
// Your header's content
#endif


3) tgaHeader_t is already defined in one of the other files that you have included (eg. a third party library)


(same reasoning for image_t)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!