Static linking
-
Our application develped in C# uses a dll and static library(lib). The dll is intermediate project for static libraty and C# application. Client has provided files(library file and a dll) which is required for interacting with their application. 1. In our C++ static library we are using only the library file provided by client by statically linking it. 2. Our C++ wrapper dll references this C++ static library created in step 1. 3. C# application references the wrapper dll created in step 2. Since the library file is statically linked in our C++ static library, does the dll also need to be linked/referred in our application.
-
Our application develped in C# uses a dll and static library(lib). The dll is intermediate project for static libraty and C# application. Client has provided files(library file and a dll) which is required for interacting with their application. 1. In our C++ static library we are using only the library file provided by client by statically linking it. 2. Our C++ wrapper dll references this C++ static library created in step 1. 3. C# application references the wrapper dll created in step 2. Since the library file is statically linked in our C++ static library, does the dll also need to be linked/referred in our application.
its not clear how the c# application (3) is using the c++ wrapper (2) if you're using p/invoke, then the 'reference/link' is in the p/invoke statements themselves, ie, the DllImport clause
-
Our application develped in C# uses a dll and static library(lib). The dll is intermediate project for static libraty and C# application. Client has provided files(library file and a dll) which is required for interacting with their application. 1. In our C++ static library we are using only the library file provided by client by statically linking it. 2. Our C++ wrapper dll references this C++ static library created in step 1. 3. C# application references the wrapper dll created in step 2. Since the library file is statically linked in our C++ static library, does the dll also need to be linked/referred in our application.
-
Our application develped in C# uses a dll and static library(lib). The dll is intermediate project for static libraty and C# application. Client has provided files(library file and a dll) which is required for interacting with their application. 1. In our C++ static library we are using only the library file provided by client by statically linking it. 2. Our C++ wrapper dll references this C++ static library created in step 1. 3. C# application references the wrapper dll created in step 2. Since the library file is statically linked in our C++ static library, does the dll also need to be linked/referred in our application.
Member 11201788 wrote:
Since the library file is statically linked in our C++ static library, does the dll also need to be linked/referred in our application.
Do you mean dll or lib at this point? If you mean lib, then it should be a no, you don't need a reference to it while building your C# application. If you mean dll, then yes, your C# application does need a reference to your dll.
-
Member 11201788 wrote:
Since the library file is statically linked in our C++ static library, does the dll also need to be linked/referred in our application.
Do you mean dll or lib at this point? If you mean lib, then it should be a no, you don't need a reference to it while building your C# application. If you mean dll, then yes, your C# application does need a reference to your dll.
Since the library file(lib provided by client) is statically linked in our C++ static library, does the dll(lib provided by client) also need to be linked/referred in our application. They(client) have provided their .lib and .dll. Can we use only .lib in our C++ static library.
-
Since the library file(lib provided by client) is statically linked in our C++ static library, does the dll(lib provided by client) also need to be linked/referred in our application. They(client) have provided their .lib and .dll. Can we use only .lib in our C++ static library.
Member 11201788 wrote:
Since the library file(lib provided by client) is statically linked in our C++ static library, does the dll(lib provided by client) also need to be linked/referred in our application.
Shouldn't have to... if you load the lib into your dll properly.
Member 11201788 wrote:
They(client) have provided their .lib and .dll. Can we use only .lib in our C++ static library.
Again, should be able to just use the lib, since it's a collection of objects. Only thing that may be a limiter is that you have to use a lib that was compiled with the same compilation settings as your project, since the name mangling of C++ can affect you being able to find your methods. A lot of people tend to do their exports/imports in a C-style format even within C++ in order to avoid C++ name mangling issues.