If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Try changing the file extension from .c to .cpp.
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