www.digitalmars.com         C & C++   DMDScript  

c++ - Now I know why it's called complex.h

reply "DMC" <tomer_sofer hotmail.com> writes:
hi there,
Well I am trying to compile a program using the file complex.h.
Interestingly it works with others programs. I am using the following list
of other functions in my programm

#include <stdlib.h>
#include <stdio.h>
#include <stam_with_loop2.c>
#include <optsvjsa.c>
#include <samain.c>
#include <stdlib.h>
#include <gasdev.c>
#include <ran1.c>
#include <crv.c>
#include <math.h>
#include <svj1.c>
#include <svc.c>
#include <bnldev.c>
#include <gammln.c>
#include <nrutil.h>
#include <midinf.c>
#include <complex.h>

But in this case my dmc gives me the following error message:

double complex      __cdecl cacos(double complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(20) : Error: ')'
expected
float complex       __cdecl cacosf(float complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(21) : Error: ')'
expected
long double complex __cdecl cacosl(long double complex z);
                                                      ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(22) : Error: ')'
expected
double complex      __cdecl casin(double complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(24) : Error: ')'
expected
float complex       __cdecl casinf(float complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(25) : Error: ')'
expected
Fatal error: too many errors
--- errorlevel 1

I really don't have a clue what to do. If anyone knows how to care of the
problem please let me know!

It is pretty urgent. Thanks

Tomer Sofer
Feb 13 2004
parent reply Phil Thompson <phil electricvisions.com> writes:
A few things:

1. What compiler options are you using?
2. Have you tried including complex on it's own? Does it compile?
3. I don't recommend #including source files. It's better to use a makefile


Regards,
Phil


DMC wrote:

 hi there,
 Well I am trying to compile a program using the file complex.h.
 Interestingly it works with others programs. I am using the following list
 of other functions in my programm
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <stam_with_loop2.c>
 #include <optsvjsa.c>
 #include <samain.c>
 #include <stdlib.h>
 #include <gasdev.c>
 #include <ran1.c>
 #include <crv.c>
 #include <math.h>
 #include <svj1.c>
 #include <svc.c>
 #include <bnldev.c>
 #include <gammln.c>
 #include <nrutil.h>
 #include <midinf.c>
 #include <complex.h>
 
 But in this case my dmc gives me the following error message:
 
 double complex      __cdecl cacos(double complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(20) : Error: ')'
 expected
 float complex       __cdecl cacosf(float complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(21) : Error: ')'
 expected
 long double complex __cdecl cacosl(long double complex z);
                                                       ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(22) : Error: ')'
 expected
 double complex      __cdecl casin(double complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(24) : Error: ')'
 expected
 float complex       __cdecl casinf(float complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(25) : Error: ')'
 expected
 Fatal error: too many errors
 --- errorlevel 1
 
 I really don't have a clue what to do. If anyone knows how to care of the
 problem please let me know!
 
 It is pretty urgent. Thanks
 
 Tomer Sofer
 
 
Feb 13 2004
next sibling parent reply "DMC" <tomer_sofer hotmail.com> writes:
As you probably suspect already, I am a total programming novice, trying to
get some programms done that I need for my finance thesis. SO I honestly
don't know what compiler options I am using? How do change them? Yes complex
by itself works fine. Unfortunately I have to admit that I do not know how
to create the suitable makefile. (I know this is supposed to be really
basic, and I should try and read it in a book or something!? But if you can
please let give a short introduction how this can be done or  a link where I
can find info.) Anyway thanks for your answer!

Saludos
Tomer



"Phil Thompson" <phil electricvisions.com> schrieb im Newsbeitrag
news:c0ibk6$1g7o$1 digitaldaemon.com...
 A few things:

 1. What compiler options are you using?
 2. Have you tried including complex on it's own? Does it compile?
 3. I don't recommend #including source files. It's better to use a
makefile
 Regards,
 Phil


 DMC wrote:

 hi there,
 Well I am trying to compile a program using the file complex.h.
 Interestingly it works with others programs. I am using the following
list
 of other functions in my programm

 #include <stdlib.h>
 #include <stdio.h>
 #include <stam_with_loop2.c>
 #include <optsvjsa.c>
 #include <samain.c>
 #include <stdlib.h>
 #include <gasdev.c>
 #include <ran1.c>
 #include <crv.c>
 #include <math.h>
 #include <svj1.c>
 #include <svc.c>
 #include <bnldev.c>
 #include <gammln.c>
 #include <nrutil.h>
 #include <midinf.c>
 #include <complex.h>

 But in this case my dmc gives me the following error message:

 double complex      __cdecl cacos(double complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(20) : Error: ')'
 expected
 float complex       __cdecl cacosf(float complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(21) : Error: ')'
 expected
 long double complex __cdecl cacosl(long double complex z);
                                                       ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(22) : Error: ')'
 expected
 double complex      __cdecl casin(double complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(24) : Error: ')'
 expected
 float complex       __cdecl casinf(float complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(25) : Error: ')'
 expected
 Fatal error: too many errors
 --- errorlevel 1

 I really don't have a clue what to do. If anyone knows how to care of
the
 problem please let me know!

 It is pretty urgent. Thanks

 Tomer Sofer
Feb 13 2004
parent Phil Thompson <phil electricvisions.com> writes:
Have you tried compiling the example?

Go here http://digitalmars.com/ctg/ctg.html and click on Compiling Code.

It's best to go in small steps keeping everything running or at least 
compiling as often as possible that way you know where the problem is 
because you just changed the line of code that caused it.

That page also describes some compiler options you may need. If you just 
type DMC without anything a list of the possible options is displayed.

I know you want to dive straight in and you are panicing because you 
have like a day to finish your thesis right(?!) but if you don't start 
with the Hello World program first and gradually add a line at a time 
then you'll spend the rest of the day scratching you head trying to fix 
the problem.

By the way, you can specify the source code (.c) files on the 
commandline you don't need to include them. If you have a reasonably 
fast machine then you don't need to worry about a makefile unless you're 
working on a large program.

Hope this advice gets you going. Let me know if I can be of any further 
assistence.


Regards,
Phil



DMC wrote:
 As you probably suspect already, I am a total programming novice, trying to
 get some programms done that I need for my finance thesis. SO I honestly
 don't know what compiler options I am using? How do change them? Yes complex
 by itself works fine. Unfortunately I have to admit that I do not know how
 to create the suitable makefile. (I know this is supposed to be really
 basic, and I should try and read it in a book or something!? But if you can
 please let give a short introduction how this can be done or  a link where I
 can find info.) Anyway thanks for your answer!
 
 Saludos
 Tomer
 
 
 
 "Phil Thompson" <phil electricvisions.com> schrieb im Newsbeitrag
 news:c0ibk6$1g7o$1 digitaldaemon.com...
 
A few things:

1. What compiler options are you using?
2. Have you tried including complex on it's own? Does it compile?
3. I don't recommend #including source files. It's better to use a
makefile
Regards,
Phil


DMC wrote:


hi there,
Well I am trying to compile a program using the file complex.h.
Interestingly it works with others programs. I am using the following
list
of other functions in my programm

#include <stdlib.h>
#include <stdio.h>
#include <stam_with_loop2.c>
#include <optsvjsa.c>
#include <samain.c>
#include <stdlib.h>
#include <gasdev.c>
#include <ran1.c>
#include <crv.c>
#include <math.h>
#include <svj1.c>
#include <svc.c>
#include <bnldev.c>
#include <gammln.c>
#include <nrutil.h>
#include <midinf.c>
#include <complex.h>

But in this case my dmc gives me the following error message:

double complex      __cdecl cacos(double complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(20) : Error: ')'
expected
float complex       __cdecl cacosf(float complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(21) : Error: ')'
expected
long double complex __cdecl cacosl(long double complex z);
                                                      ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(22) : Error: ')'
expected
double complex      __cdecl casin(double complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(24) : Error: ')'
expected
float complex       __cdecl casinf(float complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(25) : Error: ')'
expected
Fatal error: too many errors
--- errorlevel 1

I really don't have a clue what to do. If anyone knows how to care of
the
problem please let me know!

It is pretty urgent. Thanks

Tomer Sofer
Feb 13 2004
prev sibling parent reply "DMC" <tomer_sofer hotmail.com> writes:
As you probably suspect already I am total programming novice and I don't
really know what options I am using! How do change the settings in general
and do have suspicion what it might be. (How do I change them?)
The file complex.h by itself works in other applications. I don't know
exactly how to create a makefile. Anyway I will figure that out, since I
suppose this is pretty basic (Any good site that explains this stuff you
know of? Why would I need to do this? In this case there's no need to
compile other functions due to the modification of other functions. What
other problems can arise by not using a makefile?

Thank you!!

Saludos
Tomer Sofer

"Phil Thompson" <phil electricvisions.com> schrieb im Newsbeitrag
news:c0ibk6$1g7o$1 digitaldaemon.com...
 A few things:

 1. What compiler options are you using?
 2. Have you tried including complex on it's own? Does it compile?
 3. I don't recommend #including source files. It's better to use a
makefile
 Regards,
 Phil


 DMC wrote:

 hi there,
 Well I am trying to compile a program using the file complex.h.
 Interestingly it works with others programs. I am using the following
list
 of other functions in my programm

 #include <stdlib.h>
 #include <stdio.h>
 #include <stam_with_loop2.c>
 #include <optsvjsa.c>
 #include <samain.c>
 #include <stdlib.h>
 #include <gasdev.c>
 #include <ran1.c>
 #include <crv.c>
 #include <math.h>
 #include <svj1.c>
 #include <svc.c>
 #include <bnldev.c>
 #include <gammln.c>
 #include <nrutil.h>
 #include <midinf.c>
 #include <complex.h>

 But in this case my dmc gives me the following error message:

 double complex      __cdecl cacos(double complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(20) : Error: ')'
 expected
 float complex       __cdecl cacosf(float complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(21) : Error: ')'
 expected
 long double complex __cdecl cacosl(long double complex z);
                                                       ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(22) : Error: ')'
 expected
 double complex      __cdecl casin(double complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(24) : Error: ')'
 expected
 float complex       __cdecl casinf(float complex z);
                                                 ^
 C:\Programme\DMCompiler\dm\bin\..\include\complex.h(25) : Error: ')'
 expected
 Fatal error: too many errors
 --- errorlevel 1

 I really don't have a clue what to do. If anyone knows how to care of
the
 problem please let me know!

 It is pretty urgent. Thanks

 Tomer Sofer
Feb 13 2004
parent Ilya Minkov <minkov cs.tum.edu> writes:
It's impossible to see from that. Try removing some of the other 
includes above, and see when *this* set of error messages goes away 
(others may pop up). Thus you will know that some certain header 
conflicts with complex.h - then you post this header here and we see.

Ur, wait, you are including source files as well... it's not good but 
anyway you can figure out where something is wrong. If it's really 
urgent you can send all your files to me per e-mail and i figure out 
tomorrow.

-eye

DMC wrote:
 As you probably suspect already I am total programming novice and I don't
 really know what options I am using! How do change the settings in general
 and do have suspicion what it might be. (How do I change them?)
 The file complex.h by itself works in other applications. I don't know
 exactly how to create a makefile. Anyway I will figure that out, since I
 suppose this is pretty basic (Any good site that explains this stuff you
 know of? Why would I need to do this? In this case there's no need to
 compile other functions due to the modification of other functions. What
 other problems can arise by not using a makefile?
 
 Thank you!!
 
 Saludos
 Tomer Sofer
 
 "Phil Thompson" <phil electricvisions.com> schrieb im Newsbeitrag
 news:c0ibk6$1g7o$1 digitaldaemon.com...
 
A few things:

1. What compiler options are you using?
2. Have you tried including complex on it's own? Does it compile?
3. I don't recommend #including source files. It's better to use a
makefile
Regards,
Phil


DMC wrote:


hi there,
Well I am trying to compile a program using the file complex.h.
Interestingly it works with others programs. I am using the following
list
of other functions in my programm

#include <stdlib.h>
#include <stdio.h>
#include <stam_with_loop2.c>
#include <optsvjsa.c>
#include <samain.c>
#include <stdlib.h>
#include <gasdev.c>
#include <ran1.c>
#include <crv.c>
#include <math.h>
#include <svj1.c>
#include <svc.c>
#include <bnldev.c>
#include <gammln.c>
#include <nrutil.h>
#include <midinf.c>
#include <complex.h>

But in this case my dmc gives me the following error message:

double complex      __cdecl cacos(double complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(20) : Error: ')'
expected
float complex       __cdecl cacosf(float complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(21) : Error: ')'
expected
long double complex __cdecl cacosl(long double complex z);
                                                      ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(22) : Error: ')'
expected
double complex      __cdecl casin(double complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(24) : Error: ')'
expected
float complex       __cdecl casinf(float complex z);
                                                ^
C:\Programme\DMCompiler\dm\bin\..\include\complex.h(25) : Error: ')'
expected
Fatal error: too many errors
--- errorlevel 1

I really don't have a clue what to do. If anyone knows how to care of
the
problem please let me know!

It is pretty urgent. Thanks

Tomer Sofer
Feb 15 2004