0

I tried to use the bellow command to include the .dll file in my CAPL code but I got the following warning:

Warning 2102 at (6,20): Could not open C:\Users\Desktop\OpenSSL_MacGen\OpenSSL_MacGen\Debug\OpenSSL_MacGen.dll, The specified module could not be found.

#pragma library ("OpenSSL_MacGen\OpenSSL_MacGen\Debug\OpenSSL_MacGen.dll")
Daemon Painter
  • 3,208
  • 3
  • 29
  • 44
ATK
  • 13
  • 1
  • 1
  • 4
  • Is that where the file is? Generally in C or C++ code the proper directive is `#pragma comment(lib, "library name")` – Retired Ninja Jun 09 '18 at 18:36
  • yes it the right bath. I am using CAPL code and vector people directed to use #pragma library. – ATK Jun 09 '18 at 18:42
  • 1
    https://stackoverflow.com/questions/33341136/how-to-include-a-h-or-dll-file-in-canoe-capl https://stackoverflow.com/questions/43197975/how-to-access-dll-file-via-capl – Retired Ninja Jun 09 '18 at 18:42

1 Answers1

1

excerpt from CANoe help:

In CAPL programs you can call functions which you have implemented in your own Windows DLL. In doing so, the function from the DLL are exported through a function table.

The CAPL DLL interface supports callback functions starting with CANoe version 5.0.

Whenever functions of a DLL are called in the real-time area (i.e. in Simulation Setup of CANoe), they run in a high-priority thread. This can affect measurement.

In order for the CAPL compiler and CAPL browser to recognize the DLL, you must link it to the CAPL program. To do this, proceed as follows:

Enter the DLL in the Options dialog in CANoe. In this case, the DLL will be available to all CAPL programs. You can enter the DLL in the includes section of a CAPL program using the #pragma library command. In this case, it will only be available to this program.

Easiest way is to use templates available on PC with CANoe installed. Have a look into: C:\Users\Public\Documents\Vector\CANoe\9.0 (x64)\CANoe Sample Configurations\Programming\CAPLdll (or similar depending on your version of CANoe)

myszon
  • 86
  • 5