Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VC6 preprocessor symbol

VC6 preprocessor symbol

VC6 preprocessor symbol

I'm working on a cross-platform project. What I need is the preprocessor symbol for Visual C++. For example, VC doesn't seem to have unistd.h, so I have to do something similar to this:

#ifdef [VC's symbol here]
#include <direct.h>

Any help?


RE: VC6 preprocessor symbol

Dear Greg,

Well I wouldn't think you would have either WIN32 or _WINDOWS defined.

Hope this helps

RE: VC6 preprocessor symbol

Well, it has to be VC6 specific because the project must compile on CodeWarrior for PC also, so I don't believe your solution would work. Hmmm... I can't seem to find anything in the help files, maybe there isn't a symbol for VC6?

RE: VC6 preprocessor symbol

Dear Greg,

Is there some reason you can't define your own symbol?


RE: VC6 preprocessor symbol

Well, no. But, it's just a convenience. Since I am collaborating with two other programmers, I don't want to keep changing the value of the symbol (because each time they'll have to change it, commit the code, I'll update it, and then I'll have to change it back). If there was something predefined, it would make it easier. However, I will admit my "green-ness", so if you have an easy solution that won't inconvenience the other programmers, please let me know. Thanks, Palbano

P.S. Actually, I just found the symbol _MSC_VER, thanks for the help though!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close