linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: ELDK/DENX: doesn't find iostream-lib when linking
  2005-05-12  9:13 ` ELDK/DENX: doesn't find iostream-lib when linking Peter Gehirnforce
@ 2005-05-12  9:12   ` Matej Kupljen
  2005-05-12  9:47   ` Wolfgang Denk
  2005-05-12 10:26   ` Jaap-Jan Boor
  2 siblings, 0 replies; 4+ messages in thread
From: Matej Kupljen @ 2005-05-12  9:12 UTC (permalink / raw)
  To: Peter Gehirnforce; +Cc: linuxppc-embedded

Hi

> compiler = ${CROSS_COMPILE}gcc
>
> .... <snip>
>
> The program itself is using <string> <iostream> and other STL libs with
> namespaces in use.

Change the gcc to g++ if you use STL and C++ programs.

BR,
Matej

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ELDK/DENX: doesn't find iostream-lib when linking
       [not found] <20050512074615.30BE8C1512@atlas.denx.de>
@ 2005-05-12  9:13 ` Peter Gehirnforce
  2005-05-12  9:12   ` Matej Kupljen
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Gehirnforce @ 2005-05-12  9:13 UTC (permalink / raw)
  To: linuxppc-embedded

I use a makefile with dependencies:

--------------------------------------------------
# Makefile for simple test program
# The CROSS_COMPILE is set globally, as well as ELDK gcc-paths

compiler = ${CROSS_COMPILE}gcc
simple_server_objects = ServerSocket.o Socket.o simple_server_main.o
simple_client_objects = ClientSocket.o Socket.o simple_client_main.o


all : Socket ServerSocket simple_server_main simple_server ClientSocket
simple_c
lient_main simple_client

simple_server: $(simple_server_objects)
        $(compiler) -o simple_server $(simple_server_objects)


simple_client: $(simple_client_objects)
        $(compiler) -o simple_client $(simple_client_objects)

#ppc_gcc dependencies, added for compiling with ppc only!!
Socket:
        $(compiler) -o Socket.o -c Socket.cpp

ServerSocket: Socket.o
        $(compiler) -o ServerSocket.o -c ServerSocket.cpp

ClientSocket: Socket.o
        $(compiler) -o ClientSocket.o -c ClientSocket.cpp

simple_server_main: ServerSocket.o
        $(compiler) -o simple_server_main.o -c simple_server_main.cpp

simple_client_main: ClientSocket.o
        $(compiler) -o simple_client_main.o -c simple_client_main.cpp

clean:
        rm -f *.o simple_server simple_client
------------------------------------------------

The program itself is using <string> <iostream> and other STL libs with
namespaces in use.
It compiles for i686 on my host machine. 
BUT I had to change the Makefile!!! (that is why I posted it)
The dependencies starting from "gcc-ppc" dependencies are added.
Are they defined wrong?

Peter

> --- Ursprüngliche Nachricht ---
> Von: Wolfgang Denk <wd@denx.de>
> An: "Peter Gehirnforce" <Gehirnmann@gmx.de>
> Kopie: etux@embeddedtux.org
> Betreff: Re: ELDK/DENX: doesn't find iostream-lib when linking
> Datum: Thu, 12 May 2005 09:46:10 +0200
> 
> In message <28918.1115882747@www45.gmx.net> you wrote:
> > 
> > when compiling for ppc_6xx architecture, the linker doesn't find the
> lib's
> > for iostream headers.
> > Do I have to use other headers than the standard <iostream> ones, or do
> they
> > simply not exist?
> 
> I guess this is a usage  error.  Can  you  please  provide  a  simple
> example which shows the problem?
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> What is research but a blind date with knowledge?      -- Will Harvey
> _______________________________________________
> etux mailing list
> etux@embeddedtux.org
> http://www.embeddedtux.org/mailman/listinfo/etux
> 

-- 
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ELDK/DENX: doesn't find iostream-lib when linking
  2005-05-12  9:13 ` ELDK/DENX: doesn't find iostream-lib when linking Peter Gehirnforce
  2005-05-12  9:12   ` Matej Kupljen
@ 2005-05-12  9:47   ` Wolfgang Denk
  2005-05-12 10:26   ` Jaap-Jan Boor
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2005-05-12  9:47 UTC (permalink / raw)
  To: Peter Gehirnforce; +Cc: linuxppc-embedded

In message <25101.1115889218@www45.gmx.net> you wrote:
> I use a makefile with dependencies:

I asked for the COMMANDS used, not for a Makefile. A log of the build
process would have been more useful, but anyway...

> compiler = ${CROSS_COMPILE}gcc
...
> simple_client: $(simple_client_objects)
>         $(compiler) -o simple_client $(simple_client_objects)
> 
> #ppc_gcc dependencies, added for compiling with ppc only!!
> Socket:
>         $(compiler) -o Socket.o -c Socket.cpp
...

> Are they defined wrong?

You are using the wrong compiler. GCC is a C Compiler,  but  you  are
trying  to compile and link C++ code. GCC does not know how to handle
this. Please use a C++ compiler - i. e. "g++" - instead.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Unix is like a toll road on which you have to stop every 50  feet  to
pay another nickel. But hey! You only feel 5 cents poorer each time.
                 - Larry Wall in <1992Aug13.192357.15731@netlabs.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ELDK/DENX: doesn't find iostream-lib when linking
  2005-05-12  9:13 ` ELDK/DENX: doesn't find iostream-lib when linking Peter Gehirnforce
  2005-05-12  9:12   ` Matej Kupljen
  2005-05-12  9:47   ` Wolfgang Denk
@ 2005-05-12 10:26   ` Jaap-Jan Boor
  2 siblings, 0 replies; 4+ messages in thread
From: Jaap-Jan Boor @ 2005-05-12 10:26 UTC (permalink / raw)
  To: Peter Gehirnforce; +Cc: linuxppc-embedded

Peter,

you should use g++ as compiler front end when compiling C++ programs
> compiler =3D ${CROSS_COMPILE}g++

best regards,

Jaap-Jan

On 12-mei-05, at 11:13, Peter Gehirnforce wrote:

> I use a makefile with dependencies:
>
> --------------------------------------------------
> # Makefile for simple test program
> # The CROSS_COMPILE is set globally, as well as ELDK gcc-paths
>
> compiler =3D ${CROSS_COMPILE}gcc
> simple_server_objects =3D ServerSocket.o Socket.o simple_server_main.o
> simple_client_objects =3D ClientSocket.o Socket.o simple_client_main.o
>
>
> all : Socket ServerSocket simple_server_main simple_server =
ClientSocket
> simple_c
> lient_main simple_client
>
> simple_server: $(simple_server_objects)
>         $(compiler) -o simple_server $(simple_server_objects)
>
>
> simple_client: $(simple_client_objects)
>         $(compiler) -o simple_client $(simple_client_objects)
>
> #ppc_gcc dependencies, added for compiling with ppc only!!
> Socket:
>         $(compiler) -o Socket.o -c Socket.cpp
>
> ServerSocket: Socket.o
>         $(compiler) -o ServerSocket.o -c ServerSocket.cpp
>
> ClientSocket: Socket.o
>         $(compiler) -o ClientSocket.o -c ClientSocket.cpp
>
> simple_server_main: ServerSocket.o
>         $(compiler) -o simple_server_main.o -c simple_server_main.cpp
>
> simple_client_main: ClientSocket.o
>         $(compiler) -o simple_client_main.o -c simple_client_main.cpp
>
> clean:
>         rm -f *.o simple_server simple_client
> ------------------------------------------------
>
> The program itself is using <string> <iostream> and other STL libs =
with
> namespaces in use.
> It compiles for i686 on my host machine.
> BUT I had to change the Makefile!!! (that is why I posted it)
> The dependencies starting from "gcc-ppc" dependencies are added.
> Are they defined wrong?
>
> Peter
>
>> --- Urspr=FCngliche Nachricht ---
>> Von: Wolfgang Denk <wd@denx.de>
>> An: "Peter Gehirnforce" <Gehirnmann@gmx.de>
>> Kopie: etux@embeddedtux.org
>> Betreff: Re: ELDK/DENX: doesn't find iostream-lib when linking
>> Datum: Thu, 12 May 2005 09:46:10 +0200
>>
>> In message <28918.1115882747@www45.gmx.net> you wrote:
>>>
>>> when compiling for ppc_6xx architecture, the linker doesn't find the
>> lib's
>>> for iostream headers.
>>> Do I have to use other headers than the standard <iostream> ones, or=20=

>>> do
>> they
>>> simply not exist?
>>
>> I guess this is a usage  error.  Can  you  please  provide  a  simple
>> example which shows the problem?
>>
>> Best regards,
>>
>> Wolfgang Denk
>>
>> --=20
>> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
>> What is research but a blind date with knowledge?      -- Will Harvey
>> _______________________________________________
>> etux mailing list
>> etux@embeddedtux.org
>> http://www.embeddedtux.org/mailman/listinfo/etux
>>
>
> --=20
> +++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
> GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-12 10:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050512074615.30BE8C1512@atlas.denx.de>
2005-05-12  9:13 ` ELDK/DENX: doesn't find iostream-lib when linking Peter Gehirnforce
2005-05-12  9:12   ` Matej Kupljen
2005-05-12  9:47   ` Wolfgang Denk
2005-05-12 10:26   ` Jaap-Jan Boor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).