Re: [LINUX:3154] Re: C++ derleme?

Yavuz Selim Komur (komur@Bilkent.EDU.TR)
Fri, 19 Jun 1998 08:51:52 +0300 (EET DST)


On Thu, 18 Jun 1998, Okan Asik wrote:

> Selam,
>
> Sanirim Red Hat tabanli bir sistem kullaniyorsunuz. Ben sizin yerinizde
> olsam Slackware kurardim. Fakat illede Red Hat kullanicagim derseniz,

Ciddi olamassin yahu.. Istersen solaris felanda kursun :))

> http://www.redhat.com/errata 'dan GlibC ve libc5 dosyalarinin update'lerini
> cekmeniz gerekir. Ama unutmamak sunuda gerekir ki, ileride Linux u daha iyi
> ogrendiginiz de bunun gibi sorunlar, siz Red Hat`den kurtulana kadar yine
> karsiniza cikacaktir.

:)))
Cok ilginc.. Yada ben cok balik birisiim..

>
> Saygilarla...
>
> Pc NET
> Okan Asik < okana@linux.org.tr >
Yapma ya linux.org.tr ha

>
>
> Osman Demirhan wrote:
>
> > Herkese selam;
> >
> > C++ ile yazilmis basit bir iki programi derlerken derleme hatalari ile
> > karsilastim. Dusunceme gore gcc'ye eksik parametre girdim. Acaba C++ ile
> > yazilmis kodu gcc ile derlerken hangi secenekleri kullanmaliyim?
> >
> > Herkese kolay gelsin.
> >
> > Saygi, sevgi, LinuX.
> >
> > ----------------------------------------------------------
> > Birinci Dosya: (Klasik baslama programi:)
> >
> > #include <iostream.h>
> > #include <iomanip.h>
> > main (){
> > cout << "Hello!;
^^^ "
> > }
> >
> > Komut satiri: gcc hello.cc -o hello
> >
> > HATA MESAJI:
> >
> > hello.cc:4: unterminated string or character constant
> > hello.cc:4: possible real start of unterminated constant

Burayi okuyup anlamadigini soyleme..

> > ---------------------------------------------------------------
> >
> > Ikinci Dosya:
> >
> > #include <iostream.h>
> > #include <iomanip.h>
> > main (){
> > float temp;
> > cout << "Please type the temprature (deg F): ";
> > cin >> temp;
> > cout << temp;
> > cout << "Deg F is";
> > cout << (5.0 * (temp - 32)) / 9.0;
> > cout << "deg C";
> > }
> >
> > Komut satiri yine ayni

g++ -o abc abc.cc

olarak dene.

> >
> > HATA MESAJI:
> >
> > /tmp/cca007571.o: In function `main':
> > /tmp/cca007571.o(.text+0xc): undefined reference to `cout'
> > /tmp/cca007571.o(.text+0x11): undefined reference to
> > `ostream::operator<<(char const *)'
> > /tmp/cca007571.o(.text+0x1f): undefined reference to `cin'
> > /tmp/cca007571.o(.text+0x24): undefined reference to
> > `istream::operator>>(float&)'
> > /tmp/cca007571.o(.text+0x31): undefined reference to `cout'
> > /tmp/cca007571.o(.text+0x36): undefined reference to
> > `ostream::operator<<(float)'
> > /tmp/cca007571.o(.text+0x45): undefined reference to `cout'
> > /tmp/cca007571.o(.text+0x4a): undefined reference to
> > `ostream::operator<<(char const *)'
> > /tmp/cca007571.o(.text+0x75): undefined reference to `cout'
> > /tmp/cca007571.o(.text+0x7a): undefined reference to
> > `ostream::operator<<(double)'
> > /tmp/cca007571.o(.text+0x89): undefined reference to `cout'
> > /tmp/cca007571.o(.text+0x8e): undefined reference to
> > `ostream::operator<<(char const *)'
> >
> >
> > --------------------------------------
> > | Osman Demirhan |
> > | Kocaeli Universitesi |
> > | Elektronik ve Haberlesme Muh. Bol. |
> > --------------------------------------
>
>
>
>