User forums > General (but related to Code::Blocks)
select a host application to "run"
MortenMacFly:
--- Quote from: J4e8a16n on April 28, 2009, 09:12:58 pm ---exemple.c compiled as exemple.o has main function.
If it is compiled by code block can that be the host application?
--- End quote ---
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.
J4e8a16n:
I already did sucessfully three projects with dlls using the compiler directly. One static and two dynamic dlls with success at http://www.cygwin.com/cygwin-ug-net/dll.html#dll-build
So I told to myself, 'now lets see if it would be automatic with C::B'. It does not seem so.
C::B creates the o files but dont relate (linK) them. I doubt it is not related to C::B but you are the boss on that matter and I dont want to wear your avatar.
Well that's ok.
Have a good day.
MortenMacFly:
--- Quote from: J4e8a16n on April 28, 2009, 09:51:09 pm ---So I told to myself, 'now lets see if it would be automatic with C::B'.
--- End quote ---
See: This cannot be done automatically without taking the risk of making errors. The correct project setup has to be done by the developer.
--- Quote from: J4e8a16n on April 28, 2009, 09:51:09 pm ---I doubt it is not related to C::B [...]
--- End quote ---
Well - if you were right we would not be able to build C::B using C::B (as C::B uses DLL's as plugins)... right? But we do... so...?!
J4e8a16n:
--- Quote ---See: This cannot be done automatically without taking the risk of making errors. The correct project setup has to be done by the developer.
--- End quote ---
Yes.
That's ok.
Usually, they (creator) is an ultra basic project showing how to do that kind of project and then they (visualC++, etc) let the user develop complex things by themselves.
We, the users, read the automatically generated makefile, etc, and learn from that. We dont learn C.
We dont learn how to make C with learn how to use the user interface.
It is only my 2 cents.
Navigation
[0] Message Index
[*] Previous page
Go to full version