Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VC6 preprocessor symbol

Status
Not open for further replies.

gtada

Programmer
Mar 3, 2000
4
CA
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: <br><br>#ifdef [VC's symbol here] <br>#include &lt;direct.h&gt; <br>#endif <br><br>Any help? <br><br>Thanks, <br>Greg <br><br>
 
Dear Greg,<br><br>Well I wouldn't think you would have either WIN32 or _WINDOWS defined.<br><br>Hope this helps<br>-pete
 
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?
 
Dear Greg,<br><br>Is there some reason you can't define your own symbol?<br><br>-pete
 
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 &quot;green-ness&quot;, so if you have an easy solution that won't inconvenience the other programmers, please let me know. Thanks, Palbano<br><br>P.S. Actually, I just found the symbol _MSC_VER, thanks for the help though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top