Jump to content
  • Advertisement
Sign in to follow this  

MSVC 6.0 and long long

This topic is 4725 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 just ran into this problem with msvc seeing "long long" initializers to be an error. i can't modify the code im trying to compile and it runs fine on linux. is there a fix for this?

Share this post


Link to post
Share on other sites
Advertisement
VC6 expects __int64 in place of long long. Just how much restriction do you have on modifying the code? Short of replacing all instances of "long long" with an intermediate like "longlong" and typedef'ing it, there's not many good ways around that (that I know of, at least).

Share this post


Link to post
Share on other sites
yes, but what ApochPiQ is getting at is something like this:


#ifdef _WIN32
typedef __int64 longlong_t;
#else
typedef long long longlong_t;
#endif

Then you use longlong_t to define your variables.

Share this post


Link to post
Share on other sites
I'd upgrade [smile] But aside from that, a typedef never killed anyone. I've got typedefs for most basic types, so I can swap them out for more appropriate ones easily if need be.

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.

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

Sign me up!