Menu

how to change linker settings

2005-08-19
2012-09-26
  • Nobody/Anonymous

    hi

    i would like to compile some .c files using g++

    I am able to do so by changing the project options - file then x in on compile as c++

    however when it links the files, its using gcc..
    is there any way to set the linker so it uses g++

    Thanks

     
    • Nobody/Anonymous

      Try changing the file extension from .c to .cpp.

       
    • Anonymous

      Anonymous - 2005-08-19

      There is probably no need, when the compiler is invoked to perform the link, it actually invokes ld.exe. If the compiler is invoked without sourcefiles and without the -c option, it simply invokes the linker, it is the same linker regardless of C or C++ compilation.

      Since for projects Dev-C++ always uses a separate link stage I do not know why it invokes it through the compiler rather than calling ld directly. It annoys me because it hides what is really happening and is the cause of many misunderstandings. Calling the linker through the compiler is intended as a convenience feature for single source file builds.

      Clifford

       

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.