This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linux C++ Help


At 15.21 06/12/2002 +0530, Jayanta Narayan Choudhuri wrote:
I am seeking your help ONLY after exhausting myself!

If you can help me get "g++ -o x.exe gplus.cpp" to link & work then rest will hopefully follow.
Ehm, I don't know what to say, actually.
The only problem I found with your gplus.cpp is a missing

#include <cstring>

(gcc complained about strlen being undefind).
After adding it right after

#include <ctime>

all went smoothly.
I tried under RedHat Linux (gcc 2.96 and 3.2) and Cygwin (gcc 2.95 and 3.2), without any problem at all:
[Linux] $ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
[Linux] $ g++ -o x.exe gplus.cpp
[Linux] $ ./x.exe
Start ACFEScnv: 13:43:05.278
End ACFEScnv: 13:43:05.278

[Linux] $ g++296 -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
[Linux] $ g++296 -o x.exe gplus.cpp
[Linux] $ ./x.exe
Start ACFEScnv: 13:43:57.531
End ACFEScnv: 13:43:57.539

C:\Documents and Settings\fwyzard\Desktop\test>g++-2 -v
Reading specs from /cygdrive/c/Program Files/cygwin/bin/../lib/gcc-lib/i686-pc-cygwin/2.95.3-10/specs
gcc version 2.95.3-10 (cygwin special)

C:\Documents and Settings\fwyzard\Desktop\test>g++-2 -o x.exe gplus.cpp

C:\Documents and Settings\fwyzard\Desktop\test>x
Start ACFEScnv: 13:41:45.526
End ACFEScnv: 13:41:45.526

C:\Documents and Settings\fwyzard\Desktop\test>g++ -v
Reading specs from /cygdrive/c/Program Files/cygwin/bin/../lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-3/configure --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --without-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr--sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020927 (prerelease)

C:\Documents and Settings\fwyzard\Desktop\test>g++ -o x.exe gplus.cpp

C:\Documents and Settings\fwyzard\Desktop\test>x
Start ACFEScnv: 13:42:29.138
End ACFEScnv: 13:42:29.138

Sorry I coudn't be of more help :-(
fwyzard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]