Menu

Dev-C++ Linker Error

Z_K
2008-06-15
2012-09-26
  • Z_K

    Z_K - 2008-06-15

    I just installed Dev-C++ and tried to compile a very simple hello world project, but I get this linker error.

    Compiler: Default compiler
    Building Makefile: "C:\Documents and Settings\xxxxxxx\My Documents\Dev-C++ Projects\Hello\Makefile.win"
    Executing make...
    make.exe -f "C:\Documents and Settings\xxxxxx\My Documents\Dev-C++ Projects\Hello\Makefile.win" all
    g++.exe ../Hello/Hello.o ../Hello/Hello_private.res -o "Hello.exe" -L"C:/Dev-Cpp/lib"

    /mingw/lib/crt2.o(.text+0x167):crt1.c: undefined reference to `__cpu_features_init'
    collect2: ld returned 1 exit status

    make.exe: *** [Hello.exe] Error 1

    Execution terminated

    Anyone know why and how to fix this?

     
    • cpns

      cpns - 2008-06-15

      This error occurs when you have more than one GNU toolchain installed (perhaps another copy of MinGW or Cygwin or a cross-compiler).

      I think you can fix it for Dev-C++ by placing c:\dev-cpp\bin at the head of your PATH environment variable, but it may then break the other tool - it depends on how that is set up and how you use it.

      You are also going to have to read the "PLEASE READ BEFORE POSTING A QUESTION" - all those spaces in your project path are going to get you in the end!

      Clifford

       
    • Z_K

      Z_K - 2008-06-15

      Okay, thanks. I will try to post properly next time. In any case, I got it working by installing a version of Dev-C++ (4.9.9.2) that does not install another copy of MinGW. Then I just adjusted the paths. Thanks again.

       
      • cpns

        cpns - 2008-06-15

        That's what the last person who reported this issue did. You might have searched the forum for "__cpu_features_init" for example.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.