Previous Topic

Next Topic

Book Contents

Book Index

General guide to any toolkit!

A picture says more than thousand words ...

This figure tells you that one or more source files are transformed to object files and via the linker transformed again to an executable program. The steps below dives into this process.

In This Section

It all starts with the source code...

The COMPILER transform the source code to intermediate files, the object files

The LINKER combines your object files with other libraries into an executable

The result is an EXECUTABLE file (or a DLL or a LIB ...)

Oh, the result (executable, dll, lib) can be either debug or release ?!?

See Also

General knowledge nice to know before we start!

General structure of most toolkits - including Notes C and C++ APIs

One way to organize your tookits and source code

General quirks you need to be aware of

Previous Topic

Next Topic

Book Contents

Book Index

It all starts with the source code...

Basically any C or C++ program contain one or more of these types of files, commonly called source code:

So if you see that an application is shipped with the source code, or one of your colleguages asks for the source code of your new marvel application, you know what files he or she wants!

You can think of source code as the recepie for a meal. Without it, no meal!

See Also

General guide to any toolkit!

The COMPILER transform the source code to intermediate files, the object files

The LINKER combines your object files with other libraries into an executable

The result is an EXECUTABLE file (or a DLL or a LIB ...)

Oh, the result (executable, dll, lib) can be either debug or release ?!?

Previous Topic

Next Topic

Book Contents

Book Index

The COMPILER transform the source code to intermediate files, the object files

The main purpose of a compiler is to transform the source code, which in our case is either based on the C or C++ programming language, into a one or more "middle layer"-type of files called an object files. The object files contain a low level format of your code, which the next step in the process understands. You cannot run or execute object files.

You can regard object files as half-baked bread, almost ready to eat.

See Also

General guide to any toolkit!

It all starts with the source code...

The LINKER combines your object files with other libraries into an executable

The result is an EXECUTABLE file (or a DLL or a LIB ...)

Oh, the result (executable, dll, lib) can be either debug or release ?!?

Previous Topic

Next Topic

Book Contents

Book Index

The LINKER combines your object files with other libraries into an executable

The linker gather your object files and combine them with run time libraries and product libraries of all kinds. The result is an executable file, DLL or Library, which can used on the designated operating system.

See Also

General guide to any toolkit!

It all starts with the source code...

The COMPILER transform the source code to intermediate files, the object files

The result is an EXECUTABLE file (or a DLL or a LIB ...)

Oh, the result (executable, dll, lib) can be either debug or release ?!?

Previous Topic

Next Topic

Book Contents

Book Index

The result is an EXECUTABLE file (or a DLL or a LIB ...)

Remember, the executable only runs on the OS you have told it to run. Whoa - wait a minute - Does that mean that my application only can run on one platform ? Nope, you can easily create executables for several platforms from one Source Code. Of course your source code has to take differences between the platforms into consideration, and quite a lot of places you have to mark your code as "this part is just for Win32", while "another part is for Mac" and so on. But its possible and it is done all the time!

Lotus Notes and the Domino server are excellent examples of multi platform applications. They run on almost all the mainstream operating systems available.

See Also

General guide to any toolkit!

It all starts with the source code...

The COMPILER transform the source code to intermediate files, the object files

The LINKER combines your object files with other libraries into an executable

Oh, the result (executable, dll, lib) can be either debug or release ?!?

Previous Topic

Next Topic

Book Contents

Book Index

Oh, the result (executable, dll, lib) can be either debug or release ?!?

When you make an application it is unlikely that it wont contain any bugs (errors), at least in the beginning. Lets face it, even commercial applications has bugs of different severity and with different impact.

To help you find those bugs before you ship your product, you can create a special variant of your application, often referred to the debug-build. The debug-build contains lots of debugging aids such as memory validators, source code to help identifying errors with the code you have used, and not the pretty unreadable machine code etc etc. This extra payload increase the size of the executable file considerably, and debug-builds also turn off all kinds of automatic optimalizations. All this to aid you finding those bugs!

By using a special tool shipped with Visual Studio called the debugger, you can look at your code while it runs, and you can monitor and change the contents of the variables etc. If your application crash while "you're in" the debugger (the process of debugging), it will very often tell you the exact location of the crash in your source code. You also have the ability to see the sequence of function calls etc at the crash point.

The debugger is indispensable finding bugs and you will spend some time it it - believe me!

What do you do when you don't find any more bugs ? Well, maybe it's time to create the release-build. This is the executable file that you ship to customers or make available on your homepage. A release-build have stripped off all debug-info, and turned on all kinds of optimalizations. The executable file is therefore often quite small in size, and it performs like a racer!

You will see the notion of debug- and release builds throughout the course!

See Also

General guide to any toolkit!

It all starts with the source code...

The COMPILER transform the source code to intermediate files, the object files

The LINKER combines your object files with other libraries into an executable

The result is an EXECUTABLE file (or a DLL or a LIB ...)