exemple.c compiled as exemple.o has main function.
If it is compiled by code block can that be the host application?
No, because *you* told C::B in the project options to create a DLL. Thus the main function is a function of your DLL (although this is weired).
You have these options now:
1.) Change your project to produce an application
2.) Add another target -> use one target for the DLL generation, use he other for the (host) application generation.
However - this goes beyond the scope of C::B anyways so we start violating our forum rules. I suggest strongly you read yourself into library programming and how the "DLL mechanism" actually works. Hence this is not related to C::B.
Edit: Although I don't understand a single word french I believe the answer to you question is on the page you are referring to in your post in the section "II-C. Les bibliothèques dynamiques".
dsomme.c will be the DLL and
exemple.c the host application. So you need two projects (or one project with two targets alternatively)! Please read your article again.