cannot find -lstdc++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam

    cannot find -lstdc++

    Hi

    I have been trying to compile a program and keep getting this error

    gcc -g -Wall -c filecopy.c
    g++ -static -g -o assess mark.o mark1.o mark2.o mark3.o mark4.o
    mark5.o mark5a.o mark5b.o mark5c.o mark5d.o mark6.o markio.o mark7.o
    markutil.o markclas.o rportptr.o strupr.o scrnpagr.o scrnform.o
    markver.o markform.o date.o filecopy.o -lncurses
    /usr/bin/ld: cannot find -lstdc++
    collect2: ld returned 1 exit status
    make: *** [assess] Error 1
    [lgm@buzz src]$

    any help would be great.

    Thanks Adam
  • Buster

    #2
    Re: cannot find -lstdc++

    Adam wrote:
    [color=blue]
    > I have been trying to compile a program and keep getting this error
    >
    > gcc -g -Wall -c filecopy.c
    > g++ -static -g -o assess mark.o mark1.o mark2.o mark3.o mark4.o
    > mark5.o mark5a.o mark5b.o mark5c.o mark5d.o mark6.o markio.o mark7.o
    > markutil.o markclas.o rportptr.o strupr.o scrnpagr.o scrnform.o
    > markver.o markform.o date.o filecopy.o -lncurses
    > /usr/bin/ld: cannot find -lstdc++
    > collect2: ld returned 1 exit status
    > make: *** [assess] Error 1
    > [lgm@buzz src]$
    >
    > any help would be great.[/color]

    On my system, libstdc++.a is right there in /usr/lib/. Maybe your
    installation is faulty. This newsgroup discusses the C++ language.
    It's not the most suitable place for your question. See the FAQ
    and welcome message.

    --
    Regards,
    Buster.

    Comment

    • Jorge Rivera

      #3
      [OT} Re: cannot find -lstdc++

      Adam wrote:[color=blue]
      > Hi
      >
      > I have been trying to compile a program and keep getting this error
      >
      > gcc -g -Wall -c filecopy.c
      > g++ -static -g -o assess mark.o mark1.o mark2.o mark3.o mark4.o
      > mark5.o mark5a.o mark5b.o mark5c.o mark5d.o mark6.o markio.o mark7.o
      > markutil.o markclas.o rportptr.o strupr.o scrnpagr.o scrnform.o
      > markver.o markform.o date.o filecopy.o -lncurses
      > /usr/bin/ld: cannot find -lstdc++
      > collect2: ld returned 1 exit status
      > make: *** [assess] Error 1
      > [lgm@buzz src]$
      >[/color]


      You shouldn't need to. The problem I see is that you are compiling with
      gcc and linking with g++. Try being consistent (if using c++, use g++,
      C, gcc)

      JLR

      Comment

      Working...