From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a94da93d0d7bdebb,start X-Google-Attributes: gid103376,public From: machrouh Youssef Subject: C++ with gcc Date: 2000/03/24 Message-ID: <38DB7762.90530BAE@limsi.fr>#1/1 X-Deja-AN: 601762344 Content-Transfer-Encoding: 7bit Organization: Universite Paris-Sud, France. X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-24T00:00:00+00:00 List-Id: 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 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.