Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Geoff <geoff@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.c, comp.lang.c.moderated |
| Subject | Re: compile C programs for both sunstudio and Visual studio |
| Date | 2011-07-18 18:06 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <clcm-20110718-0001@plethora.net> (permalink) |
| References | <clcm-20110717-0005@plethora.net> |
Cross-posted to 2 groups.
On Sun, 17 Jul 2011 22:49:38 -0500 (CDT), happytoday
<ehabaziz2001@gmail.com> wrote:
>I comile C programs for bothe platforms : sunstudio using cc , visual
>studio 6 . Is there a command to differeniate which platform I compile
>for . That in order to use the the system command .
>
>For example :
>
>If (unixplatform)
>system("clear");
>else
>system("cls")
The Microsoft predefined macros _WIN32 and _MSC_VER come to mind,
recently _WIN64.
http://msdn.microsoft.com/en-us/library/aa273918(v=VS.60).aspx
http://msdn.microsoft.com/en-us/library/b0084kay
I suppose you could set unixplatform true by default and set it false
depending on the return from a conditionally-compiled GetVersionEx
call.
http://support.microsoft.com/kb/307394
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
compile C programs for both sunstudio and Visual studio happytoday <ehabaziz2001@gmail.com> - 2011-07-17 22:49 -0500
Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 12:34 +0100
Re: compile C programs for both sunstudio and Visual studio "Heinrich Wolf" <invalid@invalid.invalid> - 2011-07-18 15:34 +0200
Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 14:53 +0100
Re: compile C programs for both sunstudio and Visual studio Virchanza <virtual@lavabit.com> - 2011-07-18 07:31 -0700
Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 15:38 +0100
Re: compile C programs for both sunstudio and Visual studio Kenneth Brody <kenbrody@spamcop.net> - 2011-07-18 14:08 -0400
Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 19:18 +0100
Re: compile C programs for both sunstudio and Visual studio Nobody <nobody@nowhere.com> - 2011-07-19 00:41 +0100
Re: compile C programs for both sunstudio and Visual studio Ian Collins <ian-news@hotmail.com> - 2011-07-19 11:47 +1200
Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-18 19:08 -0700
Re: compile C programs for both sunstudio and Visual studio Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-22 14:58 +0300
Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-22 09:42 -0700
Re: compile C programs for both sunstudio and Visual studio Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-22 22:32 +0300
Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-22 13:16 -0700
Re: compile C programs for both sunstudio and Visual studio Nobody <nobody@nowhere.com> - 2011-07-19 12:56 +0100
Re: compile C programs for both sunstudio and Visual studio Kenneth Brody <kenbrody@spamcop.net> - 2011-07-18 14:06 -0400
Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-18 11:11 -0700
Re: compile C programs for both sunstudio and Visual studio Geoff <geoff@invalid.invalid> - 2011-07-18 18:06 -0500
Re: compile C programs for both sunstudio and Visual studio "Waldek M." <wm@localhost.localdomain> - 2011-07-18 18:07 -0500
Re: compile C programs for both sunstudio and Visual studio BGB <cr88192@hotmail.com> - 2011-07-18 18:07 -0500
Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-19 17:40 -0500
Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-20 10:43 +0200
Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-30 01:48 -0500
Re: compile C programs for both sunstudio and Visual studio Kenneth Brody <kenbrody@spamcop.net> - 2011-07-30 01:48 -0500
Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-19 17:40 -0500
csiph-web