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 4109 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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |