Hello, I have the following test program that I can compile with gcc,
but when I try to compile with the portland group compiler, pgcc, I
get a stream of errors.
#include <stdio.h>
#include <complex.h>
int main(int argc, char **argv){
complex double a={2.3+1.4*_Complex_I};
printf("a=%lf + i%lf\n",creal(a),cimag(a));
return 0;
}
I am able to use <complex> instead, and use the C++ complex class and
compile with pgCC, but since I eventually want to pass an array of
complex numbers to a Fortran function, this method is not appealing.
Is there some compiler directive that I need to use in order not to
get all of the errors?
Don 7 4075 dt*****@arlut.utexas.edu (Don Tucker) wrote in
news:5e**************************@posting.google.c om: Hello, I have the following test program that I can compile with gcc, but when I try to compile with the portland group compiler, pgcc, I get a stream of errors.
#include <stdio.h> #include <complex.h>
Is complex.h part of ISO C? If it's a gcc thing, you'd be better off
asking in one of the appropriate gnu newsgroups.
--
- Mark ->
--
Mark A. Odell wrote: dt*****@arlut.utexas.edu (Don Tucker) wrote in news:5e**************************@posting.google.c om:
Hello, I have the following test program that I can compile with gcc, but when I try to compile with the portland group compiler, pgcc, I get a stream of errors.
#include <stdio.h> #include <complex.h>
Is complex.h part of ISO C? If it's a gcc thing, you'd be better off asking in one of the appropriate gnu newsgroups.
It's part of C99.
Don, what sort of errors are you getting?
--
Russell Hanneken rg********@pobox.com
Remove the 'g' from my address to send me mail.
"Mark A. Odell" wrote: dt*****@arlut.utexas.edu (Don Tucker) wrote in
Hello, I have the following test program that I can compile with gcc, but when I try to compile with the portland group compiler, pgcc, I get a stream of errors.
#include <stdio.h> #include <complex.h>
Is complex.h part of ISO C? If it's a gcc thing, you'd be better off asking in one of the appropriate gnu newsgroups.
No, it's all quite valid. The only problem is that it needs a C99
compliant compiler, which pgcc appears not to be. He would have
found out (I think) with gcc if he used -ansi -pedantic which
restricts to C90. He could also have used --std=C99 -pedantic and
had things work.
Minimum gcc flags for portability: -W -Wall -ansi -pedantic
--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
CBFalconer <cb********@yahoo.com> wrote in
news:40***************@yahoo.com: > #include <complex.h>
Is complex.h part of ISO C? If it's a gcc thing, you'd be better off asking in one of the appropriate gnu newsgroups.
No, it's all quite valid. The only problem is that it needs a C99 compliant compiler, which pgcc appears not to be. He would have
I learn something new everyday. Thanks.
--
- Mark ->
--
CBFalconer wrote: No, it's all quite valid. The only problem is that it needs a C99 compliant compiler, which pgcc appears not to be.
Perhaps PGCC ships without a C99 library. Comeau C/C++ is advertised as
having "amazing C99 support," but is dependent on something like Dinkum
for full C99 support.
Jon Willeke wrote: CBFalconer wrote:
No, it's all quite valid. The only problem is that it needs a C99 compliant compiler, which pgcc appears not to be.
Perhaps PGCC ships without a C99 library. Comeau C/C++ is advertised as having "amazing C99 support," but is dependent on something like Dinkum for full C99 support.
Both Comeau and Dinkum are commercial things and cost a little money.
Greg and PJ are apparently cooperating to provide a C99 compiler product
to those who want it. What's the problem with Comeau + Dinkum?
--
Joe Wright mailto:jo********@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
in comp.lang.c i read: CBFalconer wrote: No, it's all quite valid. The only problem is that it needs a C99 compliant compiler, which pgcc appears not to be.
Perhaps PGCC ships without a C99 library.
which makes it non-conforming for a hosted impementation.
--
a signature This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Donald Firesmith |
last post by:
I am having trouble having Google Adsense code stored in XSL converted
properly into HTML. The <> unfortunately become < and > and then
no longer work.
XSL code is:
<script...
|
by: Peng Yu |
last post by:
http://www.digitalmars.com/rtl/complex.html
The above the specification of complex.h, but it seem that g++(3.3)
hasn't fully support it yet.
I wonder where I can find the specifications of...
|
by: Arvid Requate |
last post by:
Hello,
I'd like to understand why the following code does not compile. It
looks like a strangeness in connection with overload resolution for the
<complex> header:
The conversion operator...
|
by: Julian V. Noble |
last post by:
Dear C Mavens,
I am writing a Computing Prescription for CiSE on complex
arithmetic. I would like to be sure that I do not include
any gaffes about C99--especially about what is in the header...
|
by: J.M. |
last post by:
I have data in a double array of length 2N, which actually represents
complex numbers with real and imaginary parts interlaced. In other words,
elements in this array with even indices represents...
|
by: ajay2552 |
last post by:
Hi,
I have a query.
All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it?
One method is to use <,...
|
by: jeremit0 |
last post by:
I'm trying to sort a vector<complex<double and can't figure it
out. I recognize the problem is that there isn't a default operator<
for complex data types. I have written my own operator and can...
|
by: huili80 |
last post by:
Should complex<T>::real() and imag() return a value or a refernce?
What does the standard say about this?
I just realized that MSVC2008's implementation returns a value, but in
GCC reference is...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| |