MSVC 6.0 and long long

Started by
4 comments, last by SirLuthor 18 years, 10 months ago
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?
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).

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

could i use #ifdef _WIN32 somehow to swap out the code on compile?
yes, but what ApochPiQ is getting at is something like this:

#ifdef _WIN32typedef __int64 longlong_t;#elsetypedef long long longlong_t;#endifThen you use longlong_t to define your variables.
---CyberbrineDreamsSuspected implementation of the Windows idle loop: void idle_loop() { *((char*)rand()) = 0; }
A compiler that isn't 7 years old helps also. VC7 supports long long.
-Mike
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.
Free speech for the living, dead men tell no tales,Your laughing finger will never point again...Omerta!Sing for me now!

This topic is closed to new replies.

Advertisement