comp.lang.ada
 help / color / mirror / Atom feed
From: machrouh Youssef <machrouh@limsi.fr>
Subject: C++ with gcc
Date: 2000/03/24
Date: 2000-03-24T00:00:00+00:00	[thread overview]
Message-ID: <38DB7762.90530BAE@limsi.fr> (raw)

I try to compile C++ programs with the gcc version coming with the gnat
compiler (3.12p).

While compilation seems to work well, I got errors during linking.
When I compile the following program:

#include <iostream.h>

void main()
{

  cout<<"Quel est le prix HT ? : ";

}


I obtain the message:

gcc -v exo1.cpp
Reading specs from C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\specs
gcc version 2.8.1
 C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\cpp.exe -lang-c++ -v
-undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=8 -Di386
-D_WIN32 -DWIN32 -D__WIN32__ -D__MINGW32__ -DWINNT -D_X86_=1
-D__STDC__=1 -D__stdcall=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__)) -D__i386__ -D_WIN32 -D__WIN32__
-D__WIN32__ -D__MINGW32__ -D__WINNT__ -D_X86_=1 -D__STDC__=1
-D__stdcall=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__)) -D__i386 -D__WIN32 -D__WINNT
-Asystem(winnt) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -remap -Di386
-Di586 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__
-Asystem(unix) -Acpu(i386) -Amachine(i386) exo1.cpp C:\TEMP\cca00247.ii
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\include
 C:\GNAT\mingw32\include
End of search list.
 cc1plus C:\TEMP\cca00247.ii -quiet -dumpbase exo1.cc -version -o
C:\TEMP\cca00247.s
GNU C++ version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version
2.7.2.1.
 as -o C:\TEMP\cca002471.o C:\TEMP\cca00247.s
 ld C:\GNAT\lib\crt2.o -LC:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1
-LC:\GNAT\lib -LC:\GNAT\lib C:\TEMP\cca002471.o -lmingw32 -lgcc
-lmoldname -lmsvcrt -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc
-lmoldname -lmsvcrt
C:\TEMP\cca002471.o(.text+0x28):exo1.cc: undefined reference to `cout'
C:\TEMP\cca002471.o(.text+0x2d):exo1.cc: undefined reference to
`ostream::operator<<(char const *)'

Compilation exited abnormally with code 1 at Fri Mar 24 15:02:49


I suspect that some library is not referenced correctly.

Could someone help me.








             reply	other threads:[~2000-03-24  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-24  0:00 machrouh Youssef [this message]
2000-03-24  0:00 ` C++ with gcc Gisle S�lensminde
2000-03-24  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox