Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] Visual C++ question



> I teach C programming at Northeastern, and most of my students this
> quarter are using GCC, but WRT: Visual C++.
> How does one tell Visual C++ that it should be compiling a straight C
> program, not C++.
>
> Also, the same might go for Borland also.

I'm not sure which you mean, but in Visual C++ you can do two things:

1.> use the '/Tc' option to specify C source file, regardless of extension.
2.> use the '/Za' option to specify ANSI C - sort of - there is no guarantee
of ANSI C compatibility, it just claims that non-ANSI constructs are flagged
as errors. I suspect it should work most of the time, though.

It seems to me there was an 'ANSI_C' or 'STANDARD_C' compiler directive at
one point, but I'm not positive of that. That may have been C++Builder,
however.

Grant M.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org