02-13-2017 06:59 AM
Hello,
I have a question about libraries under CVI.
I created a CVI DLL with an exported function.
I want to reuse this function in a project (.exe), so I import the .lib and .h into my project. Everything works and compiles properly. So I have an .exe.
The problem is that when I execute this exe, it is necessary that the DLL is in the same directory as my exe (or that the path of the dll itself known in the Windows PATH). I thought (maybe wrong), that when we had the .lib in the project, the DLL was not mandatory because all (binary) code was in the .lib. So the compilation of .exe, integrate the "code" of the .lib
Thanks you for your help
Vincent
Solved! Go to Solution.
02-13-2017 09:48 AM
Hello Vincent,
If you want the binary code to be in the .lib you have to create a Static Library project(Build->Target Type). The .lib that is generated for a dll project is just an import library that specifies where the functions are located in the dll, so it must be accompanied by the dll.
Constantin
02-15-2017 02:03 AM
Hello,
I came to this conclusion. I indeed confused the .lib of import generated during the compilation of a DLL, with that generated during the compilation of a static library
Thank you
Vincent