Sign in to follow this  
Catafriggm

Preprocessor Processor Defines

Recommended Posts

I'm trying to write a program that uses some functions in assembly. I need to have a version for x86-32, and another for x86-64 running in 64-bit mode. How can I detect which with preprocessor defines, in both VC++ and G++?

Share this post


Link to post
Share on other sites
There might be some compiler specific flags for this, but the easiest would probably be to just add a compile time define yourself.
(i.e. g++ file.cpp -m64 -D_COMPILE_AS_64_BIT_).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this