Problems with configureFPGA

Hi to all,

I compiled the example DESTester with VC++ 6.0 compiler (both, console and FMC), here the results:


HalloWin.obj : error LNK2001: unresolved external Symbol “public: int __thiscall okCUsbFrontPanel::ConfigureFPGA(class std::basic_string,class std::allocator >,void (__cdecl*)(int,int,void *),void *)” (?ConfigureFPGA@okCUsbFrontPanel@@QAEHV?$basic_string@DU?$char_traits@D@std@@V?
$allocator@D@2@@std@@P6AXHHPAX@Z1@Z)
Debug/Oszi06_4.exe : fatal error LNK1120: 1 unresolved externals
Error in execution of link.exe.

Oszi06_4.exe - 2 errors, 1 Warnung(s).

When I block the function ConfigureFPGA(“destop-xem3010-1000.bit”) (as shown below)

// Download the configuration file.
// if (okNO_ERROR != dev->ConfigureFPGA(“destop-xem3010-1000.bit”))
// {
// printf(“FPGA configuration failed.\n”);
// delete dev;
// return(NULL);
// }

the programe returns:

Found a device : XEM 3010
Device firmware version : 1.2
Device seral number : FweZelghrC
Device ID : Opal Kelly XEM3010
FrontPanel support is not enabled.

Why can´t the function ConfigureFPGA be executed?
Can someone help me?

Thank you, Viktor

Please use the DLL version of the API with VS6. The VS6 version of the library was not updated with the latest release.

I will add a note regarding this to the Software Download thread.

Thank you,
but unfortunately that doesn?t solve the problem.
I created a dummy-function in class okCUsbFrontPanel(okCUsbFrontPanel.h) as follows:


okUSBFRONTPANEL_HANDLE*hndl;


/// Download an FPGA configuration from a file.
// int ConfigureFPGA(const std::string strFilename,
// void (*callback)(int, int, void *) = NULL, void *arg = NULL);

/// Download an FPGA configuration from a file.
bool ConfigureFPGA(const char *strFilename)
{
    if ( 0 != okUsbFrontPanel_ConfigureFPGA(hndl,strFilename))
        return(TRUE);
    return(0);
} 

and it works.
But I think that it is not completely ok so, because the corresponding function okUsbFrontPanel_ConfigureFPGA(okUSBFRONTPANEL_HANDLE hnd, const char *strFilename) in okFrontPanelDLL.c is not called via okDLLEXPORT Bool DLL_ENTRY,isn?t it?

best regards
viktor

Hi Viktor-

Can you please clarify the question you’re asking. You say it works, but is not working as you would expect?

Hi,
thank you for your support. I solved the problem.
The example “DES/CxxDLL” works fine.

Viktor

Viktor-

Can you post the solution so that someone in your same position can benefit from it?

I had the same problem and resolved it by including “okFrontPanelDLL.h” and changing the ConfigureFPGA call as follows:

Changed from this:
dev->ConfigureFPGA(CONFIGURATION_FILE)

to this:
okUsbFrontPanel_ConfigureFPGA(dev,CONFIGURATION_FILE)

Hi,

I am having the same problem using Visual C++ 6.0. I think the link failed because it can not find the function for some reason. Anybody know how fix this error?

Thanks in advance for any help.

Wen

The exact error message is:

Linking…
opalKellyExec.obj : error LNK2001: unresolved external symbol “public: int __thiscall okCUsbFrontPanel::ConfigureFPGA(class std::basic_string,class std::allocator >,void (__cdecl*)(int,int,void *),void *)” (?
ConfigureFPGA@okCUsbFrontPanel@@QAEHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6AXHHPAX@Z1@Z)
Debug/opalKellyExec.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.