Library definition

Hi , I want to add a library to my project (the library is 'CH341DLL.LIB') and don't know which sort of file extension have I to use and how and where can I add it?
Please explain by example
Thanks
2 answers
Sort by: Most helpful
-
-
WayneAKing 4,266 Reputation points
2021-09-10T02:32:02.04+00:00 I want to add a library to my project (the library is
'CH341DLL.LIB') and don't know which sort of file
extension have I to useWhat do you mean? You use the file extension that is
already part of the file name: .liband how and where can I add it?
A lib file is used by the Linker. There are a few
different ways to tell the Linker what to use and
where to find it.(1) As you were shown in your other thread you can use
a pragma statement at the start of your source file:#pragma comment(lib, "CH341DLL.LIB")
This assumes that you have specified the directory where
the lib is to be found in the Linker project properties
as an Additional Library Directory.(2) Another way is via the Linker Input properties for the
project as an Additional Dependency, where you add the file
name to the list already generated. This also requires that
the Additional Library Directories property has had the
location of the .lib added.- Wayne