Using c++ library with modelsim?


#1

Hi,

I am attempting something a bit odd, and was wondering if anyone here could help me out…

I got this crazy idea into my head to perform a sort of regression testing against my design in hardware by wrapping the design in a SystemC module in modelsim, and calling off to the frontpanel library to interface with the design. Unfortunatly, it seems that Modelsim’s “sccom” doesnt like the okFrontPanel.lib for some reason. It does not complain about the library itself, but when specifying “sccom -link okFrontPanel.lib” it reports "undefined reference"s on the exports of the library. If anyone could provide any suggestion’s on how to get the Mingw linker to properly understand the .lib, it would be greatly appreciated.

Thanks,
–Nate


#2

Nate-

If you’re referring to the FrontPanel API library, it is a Visual Studio library. If you want to link to something else, your best bet would be to use the DLL in some fashion. If something must be linked, you could write a wrapper for the DLL functions and compile that lib in Mingw.

Does this help?


#3

[QUOTE=Opal Kelly Support]Nate-

If you’re referring to the FrontPanel API library, it is a Visual Studio library. If you want to link to something else, your best bet would be to use the DLL in some fashion. If something must be linked, you could write a wrapper for the DLL functions and compile that lib in Mingw.

Does this help?[/QUOTE]

Yes, I’m currently also working on trying to get the DLL running, but am having some strange problems with GetProcAddress always returning 1, causing a SIGSEGV if trying to call an exported function. I will post results if I manage any.

Thanks,
–Nate