hi all,
gcc tools support typeof for c language, how can i get the same
function for the windows program?
thanks in advance.
baumann @ pan 15 4827
"baumann@pan" <ba*********@gmail.com> writes: gcc tools support typeof for c language, how can i get the same function for the windows program?
typeof is a gcc extension; it's not part of the C standard.
There are several ways to use gcc on Windows. It's also possible that
some Windows compilers may provide the same language extension, or a
similar one.
Probably a Windows-specific newsgroup is the best place to get more
information.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
if so, it is compiler specific. there is no general solution of this
problem?
Keith Thompson wrote: "baumann@pan" <ba*********@gmail.com> writes: gcc tools support typeof for c language, how can i get the same function for the windows program?
typeof is a gcc extension; it's not part of the C standard.
There are several ways to use gcc on Windows. It's also possible that some Windows compilers may provide the same language extension, or a similar one.
Probably a Windows-specific newsgroup is the best place to get more information.
Check the documentation of your candidate Windows C compilers, or ask on
their on-line forum. Intel C apparently restricts this extension to their
linux compiler. Generally, commercial linux C compilers support only
standard C plus Microsoft extensions.
--
Tim Prince
"baumann@pan" <ba*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com... if so, it is compiler specific. there is no general solution of this problem?
There is no standard C language solution.
-Mike
In article <11*********************@f14g2000cwb.googlegroups. com>,
baumann@pan <ba*********@gmail.com> wrote:
:if so, it is compiler specific. there is no general solution of this
:problem?
There is no general solution for embedded systems. There is, though,
a general solution for hosted systems.
For hosted systems, the solution is to change your compilation options
in a minor way: instead of having your IDE or makefile or whatever
compile your program directly, have it compile one of the portable C
compilers (or interpreters), and take the output of that and use it to
compile one of the virtual machine emulators for a platform supported
by gcc, and then run that virtual machine emulator to compile gcc,
and then use gcc within the virtual machine emulator to compile
your source, and then run that executable within the virtual
environment. You likely need to toss in a cross-compilation of the
portable C compiler to the emulated virtual machine.
gcc is written to be compilable in standard C instead of requiring
gcc extensions, but you can't just go for gcc -directly- because
you don't have the necessary data tables for every environment.
So all you have to do is push in the intermediate layer of the
emulated windows environment -- the emulators are written in C,
and their "bios" and OS are just data files that are available.
No problem.
If this doesn't sound like the right solution for you, then if
you want to produce portable code, you should avoid 'typeof'.
--
Are we *there* yet??
"baumann@pan" wrote: if so, it is compiler specific. there is no general solution of this problem?
If what is so? What is it? What problem?
Articles should always quote sufficient context to stand by
themselves. If you must use the broken google interface, see the
operation details in my sig, below.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
> baumann@pan <ba*********@gmail.com> wrote: if so, it is compiler specific. there is no general solution of this problem?
Please don't delete the context of your replies.
Walter Roberson wrote: There is no general solution for embedded systems. There is, though, a general solution for hosted systems.
Huh?
In standards terms, the difference between a hosted and
freestanding implementation is that the former has tighter
requirements, particularly with regard to support for required
library routines.
There's no reason to think that a compiler might not be in a
position to support typeof as an extension, purely because it
is part of a freestanding implementation.
--
Peter
ok, the 2 reply are not the same thing, lol
CBFalconer wrote: "baumann@pan" wrote: if so, it is compiler specific. there is no general solution of this problem?
If what is so? What is it? What problem?
Articles should always quote sufficient context to stand by themselves. If you must use the broken google interface, see the operation details in my sig, below.
-- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
thanks for the details you provide here much
Walter Roberson wrote: In article <11*********************@f14g2000cwb.googlegroups. com>, baumann@pan <ba*********@gmail.com> wrote: :if so, it is compiler specific. there is no general solution of
this :problem?
There is no general solution for embedded systems. There is, though, a general solution for hosted systems.
For hosted systems, the solution is to change your compilation
options in a minor way: instead of having your IDE or makefile or whatever compile your program directly, have it compile one of the portable C compilers (or interpreters), and take the output of that and use it
to compile one of the virtual machine emulators for a platform supported by gcc, and then run that virtual machine emulator to compile gcc, and then use gcc within the virtual machine emulator to compile your source, and then run that executable within the virtual environment. You likely need to toss in a cross-compilation of the portable C compiler to the emulated virtual machine.
gcc is written to be compilable in standard C instead of requiring gcc extensions, but you can't just go for gcc -directly- because you don't have the necessary data tables for every environment. So all you have to do is push in the intermediate layer of the emulated windows environment -- the emulators are written in C, and their "bios" and OS are just data files that are available. No problem.
If this doesn't sound like the right solution for you, then if you want to produce portable code, you should avoid 'typeof'. -- Are we *there* yet??
Use GCC under Windows.
baumann@pan wrote: hi all,
gcc tools support typeof for c language, how can i get the same function for the windows program?
thanks in advance.
baumann @ pan
--
Remove '.nospam' from e-mail address to reply by e-mail
the project will be compiled under visual studio2003 dot net IDE.
is it not too hard to alter the configuration of the IDE?
James McIninch wrote: Use GCC under Windows.
baumann@pan wrote:
hi all,
gcc tools support typeof for c language, how can i get the same function for the windows program?
thanks in advance.
baumann @ pan
-- Remove '.nospam' from e-mail address to reply by e-mail
In article <11**********************@g49g2000cwa.googlegroups .com>,
Peter Nilsson <ai***@acay.com.au> wrote: Walter Roberson wrote:
There is no general solution for embedded systems. There is, though, a general solution for hosted systems.
In standards terms, the difference between a hosted and freestanding implementation is that the former has tighter requirements, particularly with regard to support for required library routines.
There's no reason to think that a compiler might not be in a position to support typeof as an extension, purely because it is part of a freestanding implementation.
Freestanding implementations are not required to support the I/O
library at all, whereas hosted implementations are. Therefore any
generalized strategy that requires producing output
for a further phase is not certain to be usable on a freestanding
implementation.
The strategy I outlined relies upon Turing Equivilence and the
availability of portable C compilers and of portable virtual
machine emulators for at least one environment that gcc will
run under.
gcc is not available for all environments, partly because
the necessary defining instruction tables are not available. But gcc
is available for at least one environment which can be emulated by
a portable virtual machine, so you compile a typeof-needing program by
gcc running inside the virtual machine that you bootstrapped.
You could probably handle the sequence more directly by finding
one of the portable C compilers and modifying it to accept typeof;
that modified C compiler would be in portable C [portable to any
hosted implementation] so you could compile it with the hosting C
compiler and use the result to compile the program that needed typeof.
You wouldn't get a "native executable", you'd get something that
ran in the virtual machine of the modified portable C compiler... but
it -is- a generalized solution implementable in portable C.
Not a -pretty- solution by any means, but the OP asked for a general
solution without constraining the bounds of possibilities.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
"baumann@pan" wrote: ok, the 2 reply are not the same thing, lol CBFalconer wrote: "baumann@pan" wrote: if so, it is compiler specific. there is no general solution of this problem?
If what is so? What is it? What problem?
Articles should always quote sufficient context to stand by themselves. If you must use the broken google interface, see the operation details in my sig, below.
-- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
Please do not top-post. Your answer belongs after the material to
which you reply, and may be intermixed with it, after snipping out
all quoted portions that are not relevant to your reply. Also see
the links below.
--
Some informative links:
news:news.announce.newusers http://www.geocities.com/nnqweb/ http://www.catb.org/~esr/faqs/smart-questions.html http://www.caliburn.nl/topposting.html http://www.netmeister.org/news/learn2quote.html
On 16 May 2005 05:02:47 -0700, in comp.lang.c , "baumann@pan"
<ba*********@gmail.com> wrote: the project will be compiled under visual studio2003 dot net IDE.
then you'll need to ask in an MS group if that compiler supports
typeof
is it not too hard to alter the configuration of the IDE?
to do what ? use gcc to compile ? :-)
FWIW with some care its quite possible to compile your code with gcc,
but use the MS IDE to develop it. We do this all the time at work.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =---- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Simon |
last post by:
I'm doing a survey.
When do you think GNU/Linux will be ready for the average Joe? What
obstacles must it overcome first?
|
by: John Bailo |
last post by:
The war of the OSes was won a long time ago.
Unix has always been, and will continue to be, the Server OS in the form
of Linux.
Microsoft struggled mightily to win that battle -- creating a...
|
by: Rudolf Bargholz |
last post by:
Hi,
I have a ralatively simple SQL:
select FK from TABLE where upper(A) like 'B%' and upper(C) like 'D%'
We have DB2 UDB v7.1 FP 12 installed on Linux and on Windows 2003
On Linux using...
|
by: Shi Jin |
last post by:
Hi there,
I am now having a puzzle regarding what a function call actually does when
called.
I have a simple code to see what's going on. It is simply calling another
simple function from...
|
by: Mike |
last post by:
Open source programs in general suck pretty bad also. Here are some
loose facts regarding why projects like Linux, PHP, MYSQL, and
other open source programs suck:
- Linux is simply a clone of...
|
by: vansky |
last post by:
Dear all,
im porting a WIN APP to LINUX, and face some problems that r hard for
me to solve, could u dear guys give me some hands?
i'd like to reimplement the following funcs or replace them...
|
by: Benny Ng |
last post by:
Dear All,
Now I just finished my winform application. And a part of that is to
send email reminder to the users. It's working fine in the server that with
SMTP service in Windows 2003.
But now...
|
by: A.M |
last post by:
Hi,
I am planning to develop python applications on windows and run them on
Linux. Are ActivePython scripts compatible with Linux? Is there any
guideline that explains the compatibility...
|
by: jwwicks |
last post by:
C/C++ Programs and Debugging in Linux
This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| | |