g++ ...<bla-bla> ... my_lib.dll

Ругается на то что не может найти my_lib.dll лежит которая в этом же

каталоге и -L . установлен и -lmy_lib.dll пробовал все равно никак.

Это возможно? или я чтото противоестественное делаю?



Ответ на: комментарий от fura13

Дык в ФАК: How do I link against .lib files?

1. Build a C file with a function table. Put all functions you intend to use in that table. This forces the linker to include all the object files from the .lib. Maybe there is an option to force LINK.EXE to include an object file. 2. Build a dummy 'LibMain'. 3. Build a .def with all the exports you need. 4. Link with your .lib using link.exe.


1. Extract all the object files from the .lib using LIB.EXE. 2. Build a dummy C file referencing all the functions you need, either with a direct call or through an initialized function pointer. 3. Build a dummy LibMain. 4. Link all the objects with this file+LibMain. 5. Write a .def. 6. Link.

You can use these methods to use MSVC (and many other runtime libs) with Cygwin development tools.

Note that this is a lot of work (half a day or so), but much less than rewriting the runtime library in question from specs...

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.