Jump to content
  • Advertisement

Archived

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

Xtreme

Wierd Compiler Error

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

hi All, Just anyone have any idea as to WHY my program is coming up with the following error: C:\...\jmorecfg.h (161) : error C2371: ''INT32'' : redefinition; different basic types C:\...\INCLUDE\basetsd.h (33) : see declaration of ''INT32'' Error executing c1.exe main.obj - 1 error(s), 0 warning(s) This thing i have no idea! jmorecfg.h is one of several header files from the jpeg library. All it says is ''just copy the header file over to your directory and it will be included implicitly''.... yeah right!! I''ve tried almost everything including commenting out the offending code. Does anyone else come up with this similar problem? Its driving me insane arrrrrggggggghh! -Xtreme sig u say?

Share this post


Link to post
Share on other sites
Advertisement
Two questions:

1. Which compiler are you using?

2. Which compiler is the JPEG library written for?

If you''re using Visual C++, and the library is written for GNU C++, you could run into troubles -- older versions of either compiler weren''t exactly up-to-date with the latest standards. They are now, but Visual C++ still has a lot of stuff designed only for Windows. That could lead to problems, also.

Make sure the library is written for the compiler you are using!



"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau

Share this post


Link to post
Share on other sites
hmm, I just looked at my basetsd.h from msvc++ ver 6, and it
has a line something like:

typedef int INT32, *PINT32;

now your error message:
C:\...\jmorecfg.h (161) : error C2371: ''INT32'' : redefinition; different basic types
C:\...\INCLUDE\basetsd.h (33) : see declaration of ''INT32''


means that somewhere in jmorecfg.h there is another typedef
for a data type being called INT32 that isn''t based on an int.

If you have the complete source to the library (ie: the .h and
all the .c/.cpp files) then you could do a find/replace on all
occurances of ''INT32'', changing them to something like ''INT32B''.

If you don''t have the source (ie: you have a .lib or .dll), then
perhaps you could (temporarily) comment out line #33 of basetsd.h

one of those should work.



----------
Disco Love For Everyone

Share this post


Link to post
Share on other sites
INT32 is typedefined in both files, but not to the same.

this will result int the same error you have:

file1.h
typedef long int32;

file2.h
typedef unsigned long int32;


somewhere
include file1.h
include file2.h

Share this post


Link to post
Share on other sites
CobraA1, i''m using VC++ V6 and the source was written so that it was portable for all platforms including VC++.

i''ve tried commenting the line in jmorecfg.h but that caused more errors!

Claus, I know what you mean there, but I''ve tried your method and that is why it is conflicting with basetsd.h file.

there are two typedef defined in 2 header files and they don''t seem to like each other. commenting one causes more compiler errors instead.

sig u say?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!