D
D
Daniil Demidko2016-10-22 17:10:47
C++ / C#
Daniil Demidko, 2016-10-22 17:10:47

How to do without the import library?

The import library (.lib files) to link against. The import library is automatically created by the linker when the DLL is built.
(MDSN)

When creating a dynamic library (*.dll), Visual Studio automatically creates a static import library (*.lib) as well.
Then in the project where the dynamic library will be used, you will need to add the import library (*.lib) in the linker settings.
After that, the resulting file can use the functions from our dynamic library.
How to do without the import library? Do not offer explicit dll loading via WinApi.
In CodeLite, it was enough to add a dll to the linker settings right away, without any import libraries, and everything worked .
How to do it in Visual Studio?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Shatunov, 2016-10-22
@Daniro_San

An import library for a dll is an auxiliary artifact for linking the main program image with a dynamic module.
In general - in any way, since you do not offer an explicit download. :)
Another thing is your tricky manipulations to establish dependencies between the main and dynamic modules. Why did you need to explicitly link with the lib file?
Each studio project has a list of dependencies (References). If you install a dependency on the dynamic library project in the project of the main program module, then msbuild will connect everything for you.
And then there is the non-standard but widely supported #pragma comment(lib,"xxx.lib").

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question