Migrating from older FrontPanel version to v4.5

I am modifying a system that used XEM6010-LX45, the PC-client used an older FrontPanel (the okFrontPanelDLL.h has revision number 1283, but not exactly sure what version). The FrontPanel version was old enough such that it required libokFrontPanel.so, okFrontPanelDLL.h, and okFrontPanelDLL.cpp files.

I’m now using XEM6310-LX150, trying to reuse the PC-client code. I was under the impression that to upgrade the FrontPanel used, I simply have to swap out the libokFrontPanel.so and okFrontPanelDLL.h file, since okFrontPanelDLL.cpp is no longer required in FrontPanel v4.5. The include and linker options can probably stay the same.

However, compiling, I get errors such as:

rhd2000evalboard.h:33:7: error: forward declaration of ‘class okCFrontPanel’ class okCFrontPanel; ^ rhd2000evalboard.cpp:999:12: error: invalid use of incomplete type ‘class okCFrontPanel’ dev->SetWireInValue(WireInDacSource7, (enabled ? 0x0200 : 0x0000), 0x0200); ^

So it seems like okCFrontPanel is not being recognized. In the user manual for FrontPanel (pg. 37), I see the following:

When using the DLL in a compiled C/C++ application, you will need to link the okFrontPanel.lib file with your application. This file contains references necessary to call the functions in the DLL. You will also need to include the file okFrontPanelDLL.h in each source file that calls the DLL.

However, I don’t see any files names okFrontPanel.lib in the downloaded zip file. Can this explain the error I’m seeing? If not, what are the recommended steps in using different versions of FrontPanel?


You will need to link to the okFrontPanel.lib. Please refer to the build instructions in the Samples README file for information on that. Alternatively, check out the DESTester sample project.

There is no file named “okFrontPanel.lib” in the downloaded FrontPanel SDK.

The only files available in the API folder is ‘libokFrontPanel.so’ and ‘okFrontPanel.h’

The Makefiles of all the sample problems adds the API folder in the include directory and link to ‘libokFrontPanel.so’. This is exactly what I’m doing. But since removing the .cpp file, the forward declaration breaks. I’m wondering if there’s a recommended way to fix that.

Otherwise, I would have to stick with the older version of FP

okFrontPanel.h declares class okCFrontPanel. With this include, you shouldn’t need a forward declaration, right?

That is what I thought - okFrontPanel.h declares class okCFrontPanel, and the implementation is in the libOkFrontPanel.so (I’m assuming that’s the .lib file the manual refers to?), which we are linking to.

But removing the forward declaration only brings more errors. So I’m just using FrontPanel v4.3, which compiles with my application without a problem.

Please open a support ticket for this (support@opalkelly.com).