ld.exe: cannot find -l-lstdc++

This is a discussion on ld.exe: cannot find -l-lstdc++ within the Tech Board forums, part of the Community Boards category; I am having a little problem with mingw and codeblocks. It is trying to link to the standard library in ...

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    ld.exe: cannot find -l-lstdc++

    I am having a little problem with mingw and codeblocks. It is trying to link to the standard library in a silly way

    Code:
    Reading specs from C:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2/specs
    Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
    Thread model: win32
    gcc version 3.4.2 (mingw-special)
     C:/Bin/Mingw/bin/../libexec/gcc/mingw32/3.4.2/collect2.exe -Bdynamic -o a.exe C:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2/../../../crt2.o C:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o -LC:\Bin\Stk\bin -LC:\Bin\Mingw\Lib -LC:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2 -LC:/Bin/Mingw/bin/../lib/gcc -LC:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib -LC:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2/../../.. Debug\stdafx.o Debug\a.o -lstk -lkernel32 -l-lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt C:/Bin/Mingw/bin/../lib/gcc/mingw32/3.4.2/crtend.o
    C:\Bin\Mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -l-lstdc++
    There are no options in the project file that would lead to this sort of problem (I've looked at it with a text editor), and can't find anything that references this stdc++ library. Of course, there's just an extra -l somewhere, but I can't find where, whether it's my fault, etc.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    I haven't fired up Code::Blocks proper in quite a while, so this is just speculation.

    To me it looks like it is concatenating an empty library with the next library; i.e. -l%missing_file% -lstdc++. Could there be some kind of "empty" library entry somewhere?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,648
    hmm... is a library with no name even possible?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,499
    Maybe an extra space character somewhere, which caused the IDE to output an extra -l, only to discover that there was no filename (buggy IDE?)

    The problem could be in the IDEs project file itself, and not visible via the user interface.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. could not find -lwsock32.lib
    By thomas_joyee in forum C++ Programming
    Replies: 8
    Last Post: 07-14-2008, 12:28 PM
  3. How to find O of threads ?
    By jabka in forum C Programming
    Replies: 3
    Last Post: 03-11-2008, 12:25 PM
  4. how do u find 2nd largest number??
    By juancardenas in forum C Programming
    Replies: 8
    Last Post: 02-14-2003, 07:28 AM
  5. Q: Recursion to find all paths of a maze
    By reti in forum C Programming
    Replies: 7
    Last Post: 11-26-2002, 08:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21