By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

Compiling a C program through another C program

P: n/a
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?

Sep 29 '07 #1
Share this Question
Share on Google+
62 Replies


P: n/a
On Sep 28, 8:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
Command in unix platform will do too...

Sep 29 '07 #2

P: n/a
On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?

spawnl is not a standard C function and so is OT, and the details of
running compilers is also OT, but something like "system("cl
myprog.c");" might do the trick on some platforms, assuming the
environment is set up correctly.

Sep 29 '07 #3

P: n/a
Ajinkya wrote:
On Sep 28, 8:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
>As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?

Command in unix platform will do too...
You might try:

system("cc file.c");

Of course you can supply other options to cc too.

Sep 29 '07 #4

P: n/a

"Ajinkya" <ka*********@gmail.comwrote in message
news:11*********************@50g2000hsm.googlegrou ps.com...
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
Depending what you want to do you might want to look at my Basic interpreter
(on the website, also available as a book).
It shows how to put scripting into C programs.

(Modifying it to be C interpreter rather than a Basic interpreter is I'm
afraid a much bigger job than it might seem at first sight).

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Sep 29 '07 #5

P: n/a
In article <11**********************@y42g2000hsy.googlegroups .com>,
"ro***********@yahoo.com" <ro***********@yahoo.comwrites
>On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
>As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?


spawnl is not a standard C function
Yes
>and so is OT
No it's not.
>, and the details of
running compilers is also OT,
No they are not.
but something like "system("cl
myprog.c");" might do the trick on some platforms, assuming the
environment is set up correctly.
Spawn, fork etc start a separate process

System() and the like are used to start an external program. Of course
if as might be the case on windows the compiler might be a DLL which
means you could call it without using system()
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 29 '07 #6

P: n/a
On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:
spawnl is not a standard C function
and so is OT

No it's not.
Yes it is
, and the details of
running compilers is also OT,

No they are not.
Yes they are

Spawn, fork etc start a separate process
The terms "spawn", "fork" and "process" have no meaning in the context
of the C language
System() and the like are used to start an external program. Of course
if as might be the case on windows the compiler might be a DLL which
means you could call it without using system()
OT

Regards,
B.

Sep 29 '07 #7

P: n/a
Chris Hills said:
In article <11**********************@y42g2000hsy.googlegroups .com>,
"ro***********@yahoo.com" <ro***********@yahoo.comwrites
>>On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
>>As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?


spawnl is not a standard C function

Yes
>>and so is OT

No it's not.
You're right - it's completely topical, provided only that we can find the
source code for it. Fortunately, I have *found* the complete source code
to spawnl:

void spawnl(char *target, const char *source)
{
while(*source != '\0')
{
*target++ = *source;
if(*source++ == 'l')
{
*target++ = 'l';
}
}
*target = '\0';
}
Spawn, fork etc start a separate process
Not here they don't. Here, Spawn() moves a pawn one place to the South, and
fork() draws a Y-shaped object (like a fork in the road) on a bitmap.

If you think I'm wrong, please show me where the C Standard makes this
clear.
System() and the like are used to start an external program.
On my system, it's system() that does that. System() does something else
entirely. C is a case-sensitive language.
<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 29 '07 #8

P: n/a
In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
>On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:
>spawnl is not a standard C function
and so is OT

No it's not.

Yes it is
No it's not. As a regular here for the last 14 years I say it is ON
topic.
>
>, and the details of
running compilers is also OT,

No they are not.

Yes they are
No they are not.
>Spawn, fork etc start a separate process

The terms "spawn", "fork" and "process" have no meaning in the context
of the C language
Yes they do.
>System() and the like are used to start an external program. Of course
if as might be the case on windows the compiler might be a DLL which
means you could call it without using system()

OT
That's right ON topic.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 29 '07 #9

P: n/a
In article <0d******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
>Chris Hills said:
>In article <11**********************@y42g2000hsy.googlegroups .com>,
"ro***********@yahoo.com" <ro***********@yahoo.comwrites
>>>On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
spawnl is not a standard C function

Yes
>>>and so is OT

No it's not.

You're right - it's completely topical,
Oh good.
>Spawn, fork etc start a separate process
If you think I'm wrong, please show me where the C Standard makes this
clear.
Unless you are on comp.std.C that is not relevant. If you personally
(and a small group of vocal net nannies) want to artificially restrict
yourselfes (only) to something the rest of us don't want that is up to
you.

However as a member of the ISO C and MISRA -C groups I have to disagree
with your artificial and incorrect view of topicality on this NG.

If you don't like it not partake of those threads otherwise stop
polluting this NG with your pedantic OT whining.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 29 '07 #10

P: n/a
Chris Hills wrote:
In article <0d******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
>Chris Hills said:
>>In article <11**********************@y42g2000hsy.googlegroups .com>,
"ro***********@yahoo.com" <ro***********@yahoo.comwrites
On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
spawnl is not a standard C function

Yes
and so is OT

No it's not.

You're right - it's completely topical,
Oh good.
>>Spawn, fork etc start a separate process
If you think I'm wrong, please show me where the C Standard makes this
clear.

Unless you are on comp.std.C that is not relevant. If you personally
(and a small group of vocal net nannies) want to artificially restrict
yourselfes (only) to something the rest of us don't want that is up to you.

However as a member of the ISO C and MISRA -C groups I have to disagree
with your artificial and incorrect view of topicality on this NG.

If you don't like it not partake of those threads otherwise stop
polluting this NG with your pedantic OT whining.
He has a thread running for AGES about literary stuff (Ode to keith)
and discusses sig formats, etc etc a long list of RUBBISH.

HE can do that. We should of course follow his whims on "on topic"
stuff.

I tried to complain that literary stuff is really off topic and
was immediately insulted by the "regulars"

jacob
Sep 29 '07 #11

P: n/a
Chris Hills said:
In article <0d******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
<snip>
>>You're right - it's completely topical,
Oh good.
That's called "selective quotation", and it dishonestly distorts what I
actually wrote. Relying on crooked debating tactics significantly weakens
your presentation of your case.

You obviously have a different view of topicality to that of many people
here, but you have never (AFAIK) made it clear exactly where you think the
boundary is between topicality and non-topicality, despite repeated
requests so to do. Clearly this is worth discussing, but this thread
probably isn't the right place to do it. I'll start a new thread.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 29 '07 #12

P: n/a
On Sat, 29 Sep 2007 14:21:45 +0200, in comp.lang.c , jacob navia
<ja***@jacob.remcomp.frwrote:
>I tried to complain that literary stuff is really off topic and
was immediately insulted by the "regulars"
This is false.

You also should distinguish between good-natured chat between
colleagues, and deliberate attempts to subvert the topic of a group.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 29 '07 #13

P: n/a
In article <Ut******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
>Chris Hills said:
>In article <0d******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites

<snip>
>>>You're right - it's completely topical,
Oh good.

That's called "selective quotation", and it dishonestly distorts what I
actually wrote. Relying on crooked debating tactics significantly weakens
your presentation of your case.

You obviously have a different view of topicality to that of many people
SOME people here and my views are the same as MANY people here as we
have had this argument many times.

Most of the noise is generated by a small group shouting OT. if they
stopped doing it the amount of noise in this NG would go down and it
would not have such a poor reputation.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 29 '07 #14

P: n/a
In article <vg********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.netwrote:
>On Sat, 29 Sep 2007 14:21:45 +0200, in comp.lang.c , jacob navia
<ja***@jacob.remcomp.frwrote:
>>I tried to complain that literary stuff is really off topic and
was immediately insulted by the "regulars"

This is false.

You also should distinguish between good-natured chat between
colleagues, and deliberate attempts to subvert the topic of a group.
As anyone with an IQ above room temperature can clearly see, such
"good-natured chat between colleagues", while perhaps a good thing that
makes the world a nicer place, clearly belongs somewhere other than here
- perhaps in some IRC chat room, where good-natured chat between friends
(in every sense of the word) is commonly found.

Sep 29 '07 #15

P: n/a
"Kenny McCormack" <ga*****@xmission.xmission.comschrieb im Newsbeitrag
news:fd**********@news.xmission.com...
In article <vg********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.netwrote:
>>On Sat, 29 Sep 2007 14:21:45 +0200, in comp.lang.c , jacob navia
<ja***@jacob.remcomp.frwrote:
>>>I tried to complain that literary stuff is really off topic and
was immediately insulted by the "regulars"

This is false.

You also should distinguish between good-natured chat between
colleagues, and deliberate attempts to subvert the topic of a group.

As anyone with an IQ above room temperature can clearly see, such
Celsius or Fahrenheit?
"good-natured chat between colleagues", while perhaps a good thing that
makes the world a nicer place, clearly belongs somewhere other than here
- perhaps in some IRC chat room, where good-natured chat between friends
(in every sense of the word) is commonly found.
Bye, Jojo
Sep 29 '07 #16

P: n/a
Chris Hills said:

<snip>
Most of the noise is generated by a small group shouting OT. if they
stopped doing it the amount of noise in this NG would go down and it
would not have such a poor reputation.
No, the noise level would go *up*. This Has Already Happened, in
comp.lang.c++, in the 1990s. The group all but died. It took them years to
recover, and their recovery stemmed from a re-introduction of strict
topicality adherence. Would you have comp.lang.c travel the same road?

The only lesson we learn from history is that we don't learn from history.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 29 '07 #17

P: n/a
Chris Hills <ch***@phaedsys.orgwrote:
In article <Ut******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
>>Chris Hills said:
>>In article <0d******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites

<snip>
>>>>You're right - it's completely topical,
Oh good.

That's called "selective quotation", and it dishonestly distorts what I
actually wrote. Relying on crooked debating tactics significantly weakens
your presentation of your case.

You obviously have a different view of topicality to that of many people
SOME people here and my views are the same as MANY people here as we
have had this argument many times.

Most of the noise is generated by a small group shouting OT.
No, most of the noise is generated by the group of people complaining about the people
complaining about off-topic posts.
if they
stopped doing it the amount of noise in this NG would go down and it
would not have such a poor reputation.
If you (and everybody else) stopped complaining about the complaints about OT posts
the noise on this NG would go down considerably.

--
<Insert your favourite quote here.>
Erik Trulsson
er******@student.uu.se
Sep 29 '07 #18

P: n/a
On Sat, 29 Sep 2007 12:48:17 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:
In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:
spawnl is not a standard C function
and so is OT

No it's not.
Yes it is

No it's not. As a regular here for the last 14 years I say it is ON
topic.
Nonsense. In the first place, you haven't been a regular here for 14
years. In the second place, merely cite the section in ISO 9899, any
version, that defines the spawnl function. If you can do that, it is
topical here. If you can't do that, it is not.
, and the details of
running compilers is also OT,

No they are not.
Yes they are
No they are not.
Again, chapter and verse from the C standard.
Spawn, fork etc start a separate process
The terms "spawn", "fork" and "process" have no meaning in the context
of the C language

Yes they do.
Again, where in the C standard, that defines the C language, are these
defined?
System() and the like are used to start an external program. Of course
if as might be the case on windows the compiler might be a DLL which
means you could call it without using system()
OT

That's right ON topic.
None of "Windows" or "DLL" are topical either.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Sep 29 '07 #19

P: n/a
On Sat, 29 Sep 2007 12:56:20 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:
In article <0d******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
Chris Hills said:
In article <11**********************@y42g2000hsy.googlegroups .com>,
"ro***********@yahoo.com" <ro***********@yahoo.comwrites
On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
spawnl is not a standard C function

Yes
and so is OT

No it's not.
You're right - it's completely topical,
Oh good.
Spawn, fork etc start a separate process
If you think I'm wrong, please show me where the C Standard makes this
clear.

Unless you are on comp.std.C that is not relevant. If you personally
(and a small group of vocal net nannies) want to artificially restrict
yourselfes (only) to something the rest of us don't want that is up to
you.

However as a member of the ISO C and MISRA -C groups I have to disagree
with your artificial and incorrect view of topicality on this NG.
I see, so as a member of the ISO C working group, you fail to
understand that the C standard defines the language. Anything defined
in the C standard is part of the C language, and anything not in the C
standard is not part of the language, but a non-standard extension.

You never seemed to be so obtuse before.
If you don't like it not partake of those threads otherwise stop
polluting this NG with your pedantic OT whining.
Surely with your years of usenet experience, you are aware of the fact
that discussions about topicality are ALWAYS topical.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Sep 29 '07 #20

P: n/a
Chris Hills wrote:
bo*******@gmail.com writes
>Chris Hills <ch...@phaedsys.orgwrote:
>>>spawnl is not a standard C function and so is OT

No it's not.

Yes it is

No it's not. As a regular here for the last 14 years I say it is
ON topic.
Then you must have failed to read most posts on topicality for the
past 14 years. If you can find a reference to "spawn1" in the C
standard I will retract.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com

Sep 29 '07 #21

P: n/a

"Jack Klein" <ja*******@spamcop.netwrote in message
news:eu********************************@4ax.com...
I see, so as a member of the ISO C working group, you fail to
understand that the C standard defines the language. Anything defined
in the C standard is part of the C language, and anything not in the C
standard is not part of the language, but a non-standard extension.
ISO is a standard for C.
The leading applications software company in the world has chosen to
deprecate substantial portions of that standard, the latest version has not
been widely implemented, and large numbers of smaller platforms have never
adhered closely to it.

I think we are moving away from the ANSI standard phase of C's history and
into something new. What that will be is a good question.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Sep 29 '07 #22

P: n/a
Chris Hills wrote:

[...]
However as a member of the ISO C and MISRA -C groups I have to disagree
with your artificial and incorrect view of topicality on this NG.
As a member of the ISO C and MISRA C std groups, I would prefer if you
focus on your field of expertise. :)
I don't mind, if you go OT with safety-critical considerations or
embedded viewpoints, but spawnl() & YATD (yet-another topicality
discussion) with R.H., is a waste of our time.
--
Tor <torust [at] online [dot] no>
Sep 29 '07 #23

P: n/a
Jack Klein wrote:
On Sat, 29 Sep 2007 12:48:17 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:
>In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
>>On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:

spawnl is not a standard C function
and so is OT
No it's not.
Yes it is
So, you want to flood the newsgroup with anything from windows(4 versions),
40 dialects of unix, 100 types of embedded systems, all Apple types etc, etc...
just as long as its done in c(c++) or a system call in c(c++) ???????????????
If you win, I'l chuck out this newsgroup.
Go look at sci.astro or alt.astronomy to get a taste of "Anything goes".
Sep 29 '07 #24

P: n/a
Sjouke Burry wrote:
Jack Klein wrote:
>On Sat, 29 Sep 2007 12:48:17 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:
>>In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:

>spawnl is not a standard C function
>and so is OT
No it's not.
Yes it is
So, you want to flood the newsgroup with anything from windows(4
versions), 40 dialects of unix, 100 types of embedded systems, all Apple
types etc, etc... just as long as its done in c(c++) or a system call in
c(c++) ??????????????? If you win, I'l chuck out this newsgroup.
Go look at sci.astro or alt.astronomy to get a taste of "Anything goes".
I think you are complaining to the wrong poster. As far as I can tell, it's
Chris Hills that wants to allow non-Standard discussions.
Sep 30 '07 #25

P: n/a
Malcolm McLean wrote:
>
"Jack Klein" <ja*******@spamcop.netwrote in message
news:eu********************************@4ax.com...
>I see, so as a member of the ISO C working group, you fail to
understand that the C standard defines the language. Anything defined
in the C standard is part of the C language, and anything not in the C
standard is not part of the language, but a non-standard extension.
ISO is a standard for C.
The leading applications software company in the world has chosen to
deprecate substantial portions of that standard, the latest version has
not been widely implemented, and large numbers of smaller platforms have
never adhered closely to it.
Given the nature and quality of software produced by this "leading
applications software company", I'm not surprised that they have chosen to
break yet another standard, nor am I displeased.
I think we are moving away from the ANSI standard phase of C's history and
into something new. What that will be is a good question.
Just as surely we are moving away from desktop computing dominated by
this "leading applications software company."

Sep 30 '07 #26

P: n/a
santosh wrote:
Sjouke Burry wrote:
>Jack Klein wrote:
>>On Sat, 29 Sep 2007 12:48:17 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:

In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:
>
>>spawnl is not a standard C function
>>and so is OT
>No it's not.
Yes it is
So, you want to flood the newsgroup with anything from windows(4
versions), 40 dialects of unix, 100 types of embedded systems, all Apple
types etc, etc... just as long as its done in c(c++) or a system call in
c(c++) ??????????????? If you win, I'l chuck out this newsgroup.
Go look at sci.astro or alt.astronomy to get a taste of "Anything goes".

I think you are complaining to the wrong poster. As far as I can tell, it's
Chris Hills that wants to allow non-Standard discussions.

Sorry, but at least you understood the gist of what i meant :) :)
Sep 30 '07 #27

P: n/a
On Sep 29, 9:48 pm, Chris Hills <ch...@phaedsys.orgwrote:
In article <1191063735.824051.42...@w3g2000hsg.googlegroups.c om>,
boroph...@gmail.com writes
On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:
spawnl is not a standard C function
and so is OT
No it's not.
Yes it is

No it's not. As a regular here for the last 14 years I say it is ON
topic.
For a regular, if that is true, you certainly don't know what your
talking about.

Regards,
B.

Sep 30 '07 #28

P: n/a
On Sep 29, 8:29 am, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
We can invoke the corresponding compiler by passing the compilation/
debug options to it.

It is nothing but invoking another application from a c application.
Here it is invoking a c compiler from an application. You can do it on
your own.

Karthik Balaguru

Sep 30 '07 #29

P: n/a
On Sep 29, 10:47 am, santosh <santosh....@gmail.comwrote:
Ajinkya wrote:
On Sep 28, 8:29 pm, Ajinkya <kaleajin...@gmail.comwrote:
As "spawnl" executes an exe through C code., similarly how can we
compile a C program through another C program (on Windows platform) ?
Command in unix platform will do too...

You might try:

system("cc file.c");

Of course you can supply other options to cc too.
yes, this can be tried . Did you give this a try ?

Karthik Balaguru

Sep 30 '07 #30

P: n/a
In article <nl********************************@4ax.com>, Jack Klein
<ja*******@spamcop.netwrites
>On Sat, 29 Sep 2007 12:48:17 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:
>In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
>On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:

spawnl is not a standard C function
and so is OT

No it's not.

Yes it is

No it's not. As a regular here for the last 14 years I say it is ON
topic.

Nonsense. In the first place, you haven't been a regular here for 14
years.
I have... often not always vocal.
>In the second place, merely cite the section in ISO 9899, any
version, that defines the spawnl function. If you can do that, it is
topical here. If you can't do that, it is not.
I don't have to cite 9899.... that is your personal restrictive view of
this NG not mine.

If you want to artificially restrict YOUR PERSONAL VIEW of this NG that
is up to you but yoyu have no right or authority to inflict it on the
rest of us.

We are getting far to much noise to signal on this NG with a small but
vocal group of net nannies screaming OT for hundreds of posts.

If the Net nannies stopped screaming OT all the time we would have most
of the noise removed and we could all get on.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #31

P: n/a
In article <fd**********@aioe.org>, santosh <sa*********@gmail.com>
writes
>Sjouke Burry wrote:
>Jack Klein wrote:
>>On Sat, 29 Sep 2007 12:48:17 +0100, Chris Hills <ch***@phaedsys.org>
wrote in comp.lang.c:

In article <11*********************@w3g2000hsg.googlegroups.c om>,
bo*******@gmail.com writes
On Sep 29, 7:49 pm, Chris Hills <ch...@phaedsys.orgwrote:
>
>>spawnl is not a standard C function
>>and so is OT
>No it's not.
Yes it is
So, you want to flood the newsgroup with anything from windows(4
versions), 40 dialects of unix, 100 types of embedded systems, all Apple
types etc, etc... just as long as its done in c(c++) or a system call in
c(c++) ??????????????? If you win, I'l chuck out this newsgroup.
Go look at sci.astro or alt.astronomy to get a taste of "Anything goes".

I think you are complaining to the wrong poster. As far as I can tell, it's
Chris Hills that wants to allow non-Standard discussions.
I just want discussions about C. I don't want to artificially restrict
it to an arbitrary definition dreamed up by a small vocal minority.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #32

P: n/a
In article <C8******************************@bt.com>, Malcolm McLean
<re*******@btinternet.comwrites
>
"Jack Klein" <ja*******@spamcop.netwrote in message
news:eu********************************@4ax.com.. .
>I see, so as a member of the ISO C working group, you fail to
understand that the C standard defines the language. Anything defined
in the C standard is part of the C language, and anything not in the C
standard is not part of the language, but a non-standard extension.
ISO is a standard for C.
The leading applications software company in the world has chosen to
deprecate substantial portions of that standard,
One of the leading..... I assume you mean MS. They in my view have
subverted the standard process for C, C++. C#, C++/CLI Whether that is
for good or ill remains to be seen.
>the latest version has not been widely implemented, and large numbers
of smaller platforms have never adhered closely to it.
This is true. If ISO release ISO 9899:200* then C99 will be the
standard that never was. There has been a suggestion of dropping parts
of C99 for the next release.
>I think we are moving away from the ANSI standard phase of C's history
and into something new. What that will be is a good question.
Well that will never get discussed here because they will say it is OT.
:-)

I agree with you. Unless the ISO C group do something radical ISO C will
fade into obscurity in the same way ISO BASIC did whilst VB and many
dialects of BASIC still thrive.

MISRA-C provides a subset of what the compilers implement. It is not a
base standard in the same way ISO C is. So I don't know where things
will lead. I can't see ECMA doing a new C standard.

It was suggested (by a member of the ISO C panel) that he thought the
GCC dialect might replace the ISO definition as The Standard. SO this NG
will then die out. Note that was the GCC definition of the language
NOT the GCC compilers.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #33

P: n/a
In article <46******@news.midgard.homeip.net>, Erik Trulsson
<er******@student.uu.sewrites
>Chris Hills <ch***@phaedsys.orgwrote:
If you (and everybody else) stopped complaining about the complaints
about OT posts
the noise on this NG would go down considerably.
The OT posts are OT. SO if they stopped posting them a hell of a lot of
noise would disappear.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #34

P: n/a
In article <eu********************************@4ax.com>, Jack Klein
<ja*******@spamcop.netwrites
>However as a member of the ISO C and MISRA -C groups I have to disagree
with your artificial and incorrect view of topicality on this NG.

I see, so as a member of the ISO C working group, you fail to
understand that the C standard defines the language. Anything defined
in the C standard is part of the C language, and anything not in the C
standard is not part of the language, but a non-standard extension.
However we are here to discuss "C" if you want to discuss the standard
got to comp.std.c
>You never seemed to be so obtuse before.
I live in the real world where people use implementations of C for real
work. We need to discuss C as used not as theoretically defined but not
used.

If this NG said we will discuss ISO 989:1999+ TC1+TC2+TC3 then I would
say that is the C standard but they want to discuss ANY version of C
from K&C1 to all and any draft, committee draft or other unused draft
they can find but NOT C as it is used in reality.
>If you don't like it not partake of those threads otherwise stop
polluting this NG with your pedantic OT whining.

Surely with your years of usenet experience, you are aware of the fact
that discussions about topicality are ALWAYS topical.
Fair enough then all the posts saying the OT are OT are also OT. So we
end up with a LOT of noise because a few want to artificially change
this NG from compl.lang.C to comp.lang.std.c
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #35

P: n/a
In article <Yd*********************@telenor.com>, Tor Rustad
<to********@hotmail.comwrites
>Chris Hills wrote:

[...]
>However as a member of the ISO C and MISRA -C groups I have to
disagree with your artificial and incorrect view of topicality on
this NG.

As a member of the ISO C and MISRA C std groups, I would prefer if you
focus on your field of expertise. :)
Well apparently thin NG is ONLY for ISO C....

>I don't mind, if you go OT with safety-critical considerations or
embedded viewpoints,
That is the field of MISRA-C ISO C is the (ONLY) ON TOPIC area for
this NG apparently.
but spawnl()
Is widely used in many C implementations and various options and
techniques should be discussed. In fact he did not need spawn but a
"system" type call.

Given that pure ISO C is of little real world use for the majority a
discussion that says "spawn" is not what you need and it is only
available in some areas you need something like "system" is of use to
most people.
When it then gets very system specific like how to do it in XP. VISTA,
Red hat then direct them to the specific NG.
& YATD (yet-another topicality discussion) with R.H., is a waste of
our time.
I agree I would prefer that RH and the other small group of Net nannies
stop these YATD posts.

The problem is that evil happens when good people do nothing so if you
do not challenge these OT people they will strangle this NG.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #36

P: n/a
Chris Hills wrote:
>
.... snip ...
>
MISRA-C provides a subset of what the compilers implement. It is
not a base standard in the same way ISO C is. So I don't know
where things will lead. I can't see ECMA doing a new C standard.

It was suggested (by a member of the ISO C panel) that he thought
the GCC dialect might replace the ISO definition as The Standard.
SO this NG will then die out. Note that was the GCC definition
of the language NOT the GCC compilers.
Actually, if you suggested including the Misra definition in the
on-topic area, rather than trying to totally subvert topicality
here, you might have been successful. Of course it would probably
require that the Misra standard be made freely available, i.e.
free.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Sep 30 '07 #37

P: n/a
In article <46***************@yahoo.com>, CBFalconer
<cb********@yahoo.comwrites
>Chris Hills wrote:
>>
... snip ...
>>
MISRA-C provides a subset of what the compilers implement. It is
not a base standard in the same way ISO C is. So I don't know
where things will lead. I can't see ECMA doing a new C standard.

It was suggested (by a member of the ISO C panel) that he thought
the GCC dialect might replace the ISO definition as The Standard.
SO this NG will then die out. Note that was the GCC definition
of the language NOT the GCC compilers.

Actually, if you suggested including the Misra definition in the
on-topic area,
It is a sub set of C95 so should be on topic in that sense but it is NOT
a language standard in the same way ISO is or should be. .
>rather than trying to totally subvert topicality
here, you might have been successful.
I don't see what you are getting at
Of course it would probably
require that the Misra standard be made freely available, i.e.
free.
Why? The ISO standards are not free. I would happily give the MISRA-C
away free if you will fund the production costs.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Sep 30 '07 #38

P: n/a
Chris Hills wrote:
<to********@hotmail.comwrites
>Chris Hills wrote:

[...]
>>However as a member of the ISO C and MISRA -C groups I have to
disagree with your artificial and incorrect view of topicality
on this NG.

As a member of the ISO C and MISRA C std groups, I would prefer
if you focus on your field of expertise. :)

Well apparently thin NG is ONLY for ISO C....
Ah - finally you are catching on. :-)

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com

Sep 30 '07 #39

P: n/a
On Sat, 29 Sep 2007 23:23:58 +0100, in comp.lang.c , "Malcolm McLean"
<re*******@btinternet.comwrote:
>I think we are moving away from the ANSI standard phase of C's history and
into something new.
I think you're losing the plot. As things mature, they move TOWARDS
standardisation, not away from it.
>What that will be is a good question.
What we're probably moving towards is a new standard which includes a
raft of stuff currently excluded. This might for example include
networking (which is almost ubiquitous now, even on some embedded
hardware) and other stuff. I
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 30 '07 #40

P: n/a

"Mark McIntyre" <ma**********@spamcop.netwrote in message
news:0k********************************@4ax.com...
On Sat, 29 Sep 2007 23:23:58 +0100, in comp.lang.c , "Malcolm McLean"
<re*******@btinternet.comwrote:
>>I think we are moving away from the ANSI standard phase of C's history and
into something new.

I think you're losing the plot. As things mature, they move TOWARDS
standardisation, not away from it.
Not always. When I was little most cars had round headlights. There were two
or three diameters in production, and apart from that any lamp would fit any
car. Now virtually all are shaped, and if you crack one you have to get the
special part.

As rule however you are right. But we've got a powerful company with a
vested interest in making it more difficult to port programs between
platforms, pulling against a standard. Then the standards body has issued a
failed standard, and lost credibility. C89 is still the de facto standard,
but it is losing that status and C99 is not replacing it.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Sep 30 '07 #41

P: n/a
Chris Hills wrote:
CBFalconer <cb********@yahoo.comwrites
.... snip ...
>
>Of course it would probably require that the Misra standard be
made freely available, i.e. free.

Why? The ISO standards are not free. I would happily give the
MISRA-C away free if you will fund the production costs.
I tell you what I'll do. Send me a text (preferable) or PDF
version of the current MISRA specification, and I'll mount it on my
page (URL below) for free download. No charge. Do not fail to
include a suitable license. Limit line length to 67 for general
usability as quotation material. I'll probably mount it in a zip
with the license.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Oct 1 '07 #42

P: n/a
In article <0k********************************@4ax.com>, Mark McIntyre
<ma**********@spamcop.netwrites
>On Sat, 29 Sep 2007 23:23:58 +0100, in comp.lang.c , "Malcolm McLean"
<re*******@btinternet.comwrote:
>>I think we are moving away from the ANSI standard phase of C's history and
into something new.

I think you're losing the plot. As things mature, they move TOWARDS
standardisation, not away from it.
But sadly not towards ISO C99
>>What that will be is a good question.
What we're probably moving towards is a new standard which includes a
raft of stuff currently excluded. This might for example include
networking (which is almost ubiquitous now, even on some embedded
hardware) and other stuff. I
I think you will find there is less rather than more in the then next
standard.

When you say networking I assume you mean CAN, I2C, LIN etc

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Oct 1 '07 #43

P: n/a
In article <T-******************************@bt.com>, Malcolm
>issued a failed standard, and lost credibility. C89 is still the de
facto standard, but it is losing that status and C99 is not replacing
it.
Actually C89 has not been the defacto standard since C90.

Most compilers went to A1 and the TC's when they came out in 91-95 so
C95 is the real standard and has been for about 12 years.

There is movement from C95 to C99 but not full C99 compliance.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Oct 1 '07 #44

P: n/a
In data Sun, 30 Sep 2007 14:29:41 +0100, Chris Hills scrisse:
[comp.lang.c,alt.lang.asm]
>One of the leading..... I assume you mean MS. They in my view have
subverted the standard process for C, C++. C#, C++/CLI Whether that is
for good or ill remains to be seen.
What is "CLI"?
Oct 1 '07 #45

P: n/a
In article <61********************************@4ax.com>, "a\\/b"
<al@f.gwrites
>In data Sun, 30 Sep 2007 14:29:41 +0100, Chris Hills scrisse:
[comp.lang.c,alt.lang.asm]
>>One of the leading..... I assume you mean MS. They in my view have
subverted the standard process for C, C++. C#, C++/CLI Whether that is
for good or ill remains to be seen.

What is "CLI"?
AFAIK an MS thing. They have managed to create a "new" C++ C++/CLI
that is used in MS compilers that is nothing to do with ISOC++ but they
are fast tracking the C++/CLI standards through ECMA and then on to ISO
bypassing the usual ISO procedures for language standard as ECMA have a
fast trade route with ISO
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Oct 1 '07 #46

P: n/a
Chris Hills wrote:
<cb********@yahoo.comwrites
>Chris Hills wrote:
>>CBFalconer <cb********@yahoo.comwrites
... snip ...
>>>
Of course it would probably require that the Misra standard be
made freely available, i.e. free.

Why? The ISO standards are not free. I would happily give the
MISRA-C away free if you will fund the production costs.

I tell you what I'll do. Send me a text (preferable) or PDF
version of the current MISRA specification, and I'll mount it on my
page (URL below) for free download. No charge. Do not fail to
include a suitable license. Limit line length to 67 for general
usability as quotation material. I'll probably mount it in a zip
with the license.

No problem just send the check for the production costs to incurred
to generate the material in the PDF....
If all that is needed it indicates, to me, that you don't have a
published standard in the first place. We are not interested in
chimeras.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Oct 1 '07 #47

P: n/a
Chris Hills wrote:
In article <61********************************@4ax.com>, "a\\/b"
<al@f.gwrites
>In data Sun, 30 Sep 2007 14:29:41 +0100, Chris Hills scrisse:
[comp.lang.c,alt.lang.asm]
>>One of the leading..... I assume you mean MS. They in my view have
subverted the standard process for C, C++. C#, C++/CLI Whether that is
for good or ill remains to be seen.

What is "CLI"?

AFAIK an MS thing. They have managed to create a "new" C++ C++/CLI
that is used in MS compilers that is nothing to do with ISOC++ but they
are fast tracking the C++/CLI standards through ECMA and then on to ISO
bypassing the usual ISO procedures for language standard as ECMA have a
fast trade route with ISO
"CLI" is Command Line Interface when I read it.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Oct 1 '07 #48

P: n/a
Joe Wright wrote:
Chris Hills wrote:
>In article <61********************************@4ax.com>, "a\\/b"
>>What is "CLI"?

AFAIK an MS thing. They have managed to create a "new" C++ C++/CLI
that is used in MS compilers that is nothing to do with ISOC++ but
they are fast tracking the C++/CLI standards through ECMA and then on
to ISO bypassing the usual ISO procedures for language standard as
ECMA have a fast trade route with ISO

"CLI" is Command Line Interface when I read it.
This is more like it:

http://www.research.att.com/~bs/bs_faq.html#CppCLI

--
Tor <torust [at] online [dot] no>

printk("; corrupted filesystem mounted read/write - your computer will
explode within 20 seconds ... but you wanted it so!\n");
-2.4.3 linux/fs/hpfs/super.c
Oct 1 '07 #49

P: n/a
"Joe Wright" <jo********@comcast.netwrote in message
news:Gd******************************@comcast.com. ..
Chris Hills wrote:
In article <61********************************@4ax.com>, "a\\/b"
<al@f.gwrites
In data Sun, 30 Sep 2007 14:29:41 +0100, Chris Hills scrisse:
[comp.lang.c,alt.lang.asm]
One of the leading..... I assume you mean MS. They in my view have
subverted the standard process for C, C++. C#, C++/CLI Whether that is
for good or ill remains to be seen.

What is "CLI"?
AFAIK an MS thing. They have managed to create a "new" C++ C++/CLI
that is used in MS compilers that is nothing to do with ISOC++ but they
are fast tracking the C++/CLI standards through ECMA and then on to ISO
bypassing the usual ISO procedures for language standard as ECMA have a
fast trade route with ISO

"CLI" is Command Line Interface when I read it.
Perhaps MS (C)d that as well.

[Jw]
Oct 1 '07 #50

62 Replies

This discussion thread is closed

Replies have been disabled for this discussion.