I discovered it to be unusual and found
very little information about on the internet.
On visual studio, when we export an object
Then exe will be compiled along with the lib. Thought to myself, if I have a lib of my exe and would load an dynamic library (dll) then in it, I should
be able to use exe's exported functions and other objects.
This is correct. In fact it worked exactly like I would expect it to work in
visual studio 2017.
First question comes why do everyone recommend using an exe as a simple way to launch that very first function on dll and use that dll to export/import objects rather than the exe?
It would basically leave an exe the size of a 40kb and dll with few mb, exe purpose seems very little to exist in a first place.
Second question and the reason why we're in General,
how to do same in linux, if we should?
Instead of having .lib file, we link the .so (linux equivalent of .dll) when creating executable file what uses the dynamic library.
What do I do when I want that dynamic library to use executable's exported objects?