Is it possible to use multiple copies of one dll in one project? I want to write two classes, each of which will use its own copy of this dll. As I understand it, nothing prevents you from connecting to .pro two identical dlls from different directories, but the name of the .h file cannot be changed, as in that case it is impossible to understand which one of them to which .cpp file is fixed?

  • one
    To the project generally across on dll. These types of libraries are loaded at runtime and they will not be loaded twice if their names are the same. - Vladimir Martyanov
  • @ Vladimir Martyanov, that is, there are no options to use different copies of dll? - jesuscrew77
  • Exists: use different file names. But why do you need it? The code is the same, what's the point of downloading it twice? - Vladimir Martyanov
  • @Vladimir Martyanov, which file should be renamed? dll, .h or .lib? The point is that this library is used to interact with the device and inside it is somehow locked to the simultaneous connection of only one device. Roughly speaking, after using the connectDevice () function, it cannot be used a second time for another device. - jesuscrew77
  • one
    A * .h to dll is related indirectly, there are declared function prototypes. I suspect that you need to load different dll via LoadLibrary, get the necessary functions and pull them. - Vladimir Martyanov

0