Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between compiler and linker debug information?

I am a little confused why Delphi has Debug information in linking and debug information in compiling.

What is the difference between them ?

like image 613
opc0de Avatar asked Feb 16 '12 11:02

opc0de


People also ask

What is the difference between a compiler and an linker?

A compiler generates object code files (machine language) from source code. A linker combines these object code files into an executable.

What is difference between compile and debug?

Compile is the act of turning human-readable code into code the machine can understand and execute. Debug is the act of finding out where in the code the application is going wrong (debug = get rid of bugs.)

What is compiler and debugging?

A compiler is a software that transforms computer code written in one programming language (source code) into another programming language (target code). But, a debugger is a computer program that helps to test and debug other programs or target programs.

What is the difference between compiling and linking?

Compiling - The modified source code is compiled into binary object code. This code is not yet executable. Linking - The object code is combined with required supporting code to make an executable program. This step typically involves adding in any libraries that are required.


1 Answers

Debugging option in the Compiler will add the Debug information to the DCU files.

Debugging option in the linker will put all debug found in the DCU files into the exe/dll.

if you're using something like FastMM4 or memslueth you will need both options to help you find any faults.

If your releasing code you should disable the linker option to greatly reduce your exe size ( and protect your IPR ).

If you are releasing just the DCU files ( as a 3rd party control/library ) you should turn off the compiler setting before releasing, if you are not supplying source code.

like image 175
Dampsquid Avatar answered Oct 01 '22 18:10

Dampsquid