using pcan lib in visual studio code

USB to CAN Interface
Locked
nedite8864
Posts: 4
Joined: Wed 19. Jul 2023, 11:39

using pcan lib in visual studio code

Post by nedite8864 » Fri 21. Jul 2023, 11:42

Hi,

i would like to add PCAN lib and use it in Visual studio Code using c++.
i am unable to understand in which folder should i add the pcan lib that i downloaded from the peakcan website.
it would be great if you can tell me how can i do it using cmd prompt or in which folder of my VS code folder should i place the PEAKcan lib folder so that i can direct use the liv through c++ in VS code.
it would be great if you could describe the process step by step or suggest a video or some tutorial.

Thanks & regards,
Nedi
Exploring the peaks of CAN and LIN with Peak System Forum, where communication technology rises to new heights!

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: using pcan lib in visual studio code

Post by PEAK-Support » Fri 21. Jul 2023, 11:50

If you want to use Visual Studio with C++ you have 2 Options to use our APIs:

1. Loading the DLL with the LoadLibrary(..) Function while the Application is running, and get the Function Pointer with the GetProcAddress(...) Win API
or
2. Use the LIB (which includes NOT the functionality, only the referenz of the Address for all the used Functions)

If you choice the 2nd Option, simply copy the corresponding LIB from our Package to your project files. That is all you need to do.
And there is no "Video" available for add a file to a VC project... If you have developed with Visual Studio in the past, you know how to add a single file to a project.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

nedite8864
Posts: 4
Joined: Wed 19. Jul 2023, 11:39

Re: using pcan lib in visual studio code

Post by nedite8864 » Sun 23. Jul 2023, 09:40

Hi, thanks a lot. : )
Exploring the peaks of CAN and LIN with Peak System Forum, where communication technology rises to new heights!

Locked