2

I'd like to get this library working on Windows. At some point in the past, judging by the readme.win32 file here, it compiled "out of the box" on either MS Visual Studio 2008 (or 2005 with only a change of version number).

So far, none of my attempts to recreate this result have been successful - they have all ended with a DLL file being generated, but no accompanying .lib (Import Library) file. Reading the likes of this question emphasises that the .lib file won't be produced unless there are some exported functions, and to get the exported functions, you need to use __declspec(dllexport).

Searching the source code in this project, I can't find __declspec(dllexport) anywhere. Is there any way that an Import Library (.lib) could have ever been produced without using __declspec(dllexport)? Or could there be clever ways to hide this directive that have evaded my search?

Community
  • 1
  • 1
omatai
  • 3,448
  • 5
  • 47
  • 74
  • In the github code. `MODBUS_API` will need to be defined as `__declspec(dllexport)` when building the dll and `__declspec(dllimport)` when using it. – drescherjm Feb 02 '15 at 02:50
  • Duh! Somehow I have managed to get an older version of parts of the source code loaded into my Visual Studio project. The new version has `__declspec(dllexport)` clearly used. Can I withdraw my question in embarrassment? Thanks! :-) – omatai Feb 02 '15 at 02:58

0 Answers0