User forums > Using Code::Blocks

dll components

(1/2) > >>

demone:
I have a little question. When I was using cmake i used to create separated libraries from object files. Then I was just linking those libraries into 1 dll.

How can I do that with c::b?

What I need to do is to compile some c++ code into object files (using of course dllexport attribute when compiling since I'm under windows).
But I don't want to make immediatly a dll from them.
The point is that I'm using many packages so I want to compile every package separated with a different c::b project file for each package. After that I want to link all the libraries into 1 big dll. The main reason for doing that is that the final user has to link only with the final library instead of adding links to every single package (there are also other reasons).

Since merging dlls is not possible I wanted as previously done with Cmake to keep object files as object file and then link them as last step.

How can I achieve that with C::B?

C::B is a very good IDE, I don't want to turn back using Cmake.

stahta01:
I would link the separate projects as static libraries; and then link the static libraries into the final DLL project.

The other option is to turn off the linking for each source file.

Tim S.

demone:
I tried this but didn't worked. When I create the project that should link all "static" libraries into 1 big dll the IDE tell me that there's nothing to build so it skips linking.

I'm really in trouble with that.

stahta01:
You DO NOT put the main entry point for the DLL in a static library.

You have that code in the DLL project/target.

Tim S.

demone:
 do you know how to achieve what I want with C::B too?

Navigation

[0] Message Index

[#] Next page

Go to full version