LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1097 while calling C++ DLL

Hi all,

 

I have created a C++ DLL for Labview, but it generates error 1097 for this part of code mgr.Open() and after that, below is my code

it works fine in visual studio.

 

#include "FpgaManager.h"
#include <iostream>
namespace fpgamgr = enclustra::fpgamanager;
int main()
{
fpgamgr::FpgaManager mgr(fpgamgr::types::ApiUrl:: FX3Default());
std::cout << "FPGA Manager Version: " << mgr.Details() << std::endl;
auto& mm = mgr.CreateMemoryMap(0);
mgr.Open();
std::cout << "Register: " << std::hex << mm.ReadRegister(0x10001000) << std::endl;
return 0;
}
 
Regards,
Tushar
0 Kudos
Message 1 of 4
(754 Views)

The Call Library Node only can call exported standard C functions. It can not know about C++ object pointers nor any of the C++ object data types.

 

There are not only to many of them that the Call Library Node ever could support them, but the exact implementation of these things is compiler specific.

 

You need to write a wrapper DLL, that calls the C++ methods and exports standard C compatible functions with standard C compatible parameters.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(745 Views)

Hello Rolf Kalbermatter,

 

I will try it , thanks

 

Regards,

Tushar

 

0 Kudos
Message 3 of 4
(711 Views)

Hello Rolf Kalbermatter,

 

I have written a wrapper but still i'am not getting it , below is my code it cause error whenever i add mgr.open()

 

Regards,

Tushar

0 Kudos
Message 4 of 4
(656 Views)