question

kavehrahimi-5744 avatar image
0 Votes"
kavehrahimi-5744 asked JeanineZhang-MSFT commented

Add reference to application in c++

Hi , I am in 'Wapprojtemplate' and want to add reference to my application. My header file is CH341DLL.H I don't know how to add it to my application. I am writing my code in C++. Please help me
Thanks

c++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Castorix31 avatar image
1 Vote"
Castorix31 answered Castorix31 edited

You're talking about C++ and you tagged dotnet-csharp...

In C++, you just add at beginning :

 #include "CH341DLL.H" // (or <CH341DLL.H> if in paths)
 #pragma comment (lib, "CH341DLL")

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JeanineZhang-MSFT avatar image
1 Vote"
JeanineZhang-MSFT answered JeanineZhang-MSFT commented

Hi,

I suggest you could follow the following steps:

1,Add the path to the header file(CH341DLL.H) to the Additional Include Directories(property - >c/c++ -> General -> Additional Include Directories)

2,Add the path to the .lib file to the Additional Library Directories (property -> linker -> General -> Additional Library Directories)

3,Add the name of the .lib file with its extension to the Additional Dependencies (property -> linker -> input -> Additional Dependencies)

Best Regards,

Jeanine


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@kavehrahimi-5744

May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.

0 Votes 0 ·