Visual Studio: ignore undefined references in shared libraries

I want to compile a project that uses a shared library, but I do not have access to the lib source files. However, I have an original interface ...

All I basically want is to get the compiler to do character manipulation, etc., so I don't need to manually call GetProcAddress ...

Visual Studio, however, complains about undefined links (duh) when I don't bind to the shared lib .... With GNU LD I can use 'allow-shlib-undefined', but unfortunately I have to use MSVC ++ ... Is there something similar?

edit:

Of course, I could make a fake (proxy) dll, create stubs for all the methods found in my interface, link to them, and then load the original dll. I don't know if this was the best solution, though ...

edit2:

It looks like I can just export the characters and generate the lib file: http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/

I will try it first and report back.

+3
source share
1 answer

Try exploring "Edll for Windows" ( home ):

EnhancedDLL - have plugins and libraries with undefined symbols

4 DLL: " " , " DLL" , " .def &.a" " edll" .

+3

Source: https://habr.com/ru/post/1788258/


All Articles