Is it possible to generate a lib through the code of a dll?

57 views Asked by At

I have a C ++ project that when compiled turns into a dll. Is it possible for me to compile the same code and generate a static lib?

If possible, would I have to change a lot of the code structure?

1

There are 1 answers

0
engf-010 On

Is it possible to generate a lib through the code of a dll? Yes.

Would I have to change a lot of the code structure? If done right : not really.

Your dll-header(s) probably makes the distiction for importing and exporting declarations/definitions. You need to make a third distinction for non-dll usage (no importing exporting).

The biggest change would probably involve separating your projects structure.