Re: ld & my Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mohsen Pahlevanzadeh <mohsen@xxxxxxxxxxxxxxxxx> writes:

> I wrote a program in C, Not C++.It work good.But when i use "-x c++" in
> Makefile, i receive following errors:

You have to link with the g++ driver.  Yes, this is confusing.

> CC      = gcc
> CFLAGS  =  -g  -Wall  -pthread -DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN
> -DDSNIFF_LIBDIR=\"$(libdir)/\" 
> CPP     = -x c++ -llibstcd++

If you use this approach, -llibstdc++ must come at the end of the link
line.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux