I'm developing a communication Dll which depends on qt. When I try to use this dll in my C# code I get an error which I found was due to missing some qt's dll. After including these qt dll's the project work. My question is: How can I link these qt libraries in Visual Studio in order to avoid including the qt dll's"?
Asked
Active
Viewed 314 times
0
-
Try this one: http://stackoverflow.com/questions/189549/embedding-dlls-in-a-compiled-executable it goes for executables but perhaps it'll give you some ideas – Bartosz Janik Oct 14 '14 at 08:05
-
Just to confirm: The DLL is a C/C++ one, NOT a C# assembly, right? – Matthew Watson Oct 14 '14 at 08:08
-
1@BartoszJanik, it's very interesting! But it's actually not clear, will this violate LGPL license or not :) From your link: "For the unmanaged code (here: UnmanagedService.dll) you just link in the DLL as an Existing Item and set the Build Action to Embedded Resource. To access its functions use the DllImport attribute as usual" – Max Go Oct 14 '14 at 08:20
2 Answers
2
You need a statically linked version of the communication DLL. If there is no such version you need to stick to the DLLs.

Silicomancer
- 8,604
- 10
- 63
- 130
1
You can link Qt
statically only under GPL
or commercial license. And most of all you won't do this. So, just use dynamic linking and stay with Qt LGPL
license, which allows commercial using of your software.

Max Go
- 2,092
- 1
- 16
- 26