DESTester example with Visual C++ 2005

Hi,

I am trying to build the destester example using Visual C++ 2005 Express Edition. However, I have encountered these errors:

DESTester.obj : error LNK2019: unresolved external symbol _okUsbFrontPanel_ReadFromPipeOut@16 referenced in function “bool __cdecl performDES(void *,char * const,char *,char *,bool)” (?performDES@@YA_NPAXQADPAD2_N@Z)
DESTester.obj : error LNK2019: unresolved external symbol _okUsbFrontPanel_IsTriggered@12 referenced in function “bool __cdecl performDES(void *,char * const,char *,char *,bool)” (?performDES@@YA_NPAXQADPAD2_N@Z)
DESTester.obj : error LNK2019: unresolved external symbol _okUsbFrontPanel_UpdateTriggerOuts@4 referenced in function “bool __cdecl performDES(void *,char * const,char *,char *,bool)” (?performDES@@YA_NPAXQADPAD2_N@Z)

…etc

Can someone help me identify the problem?

Thanks.

Are you including the okFrontPanel.cpp file in your project?

Hi,

I have included these files in my Visual C++ project:

okCUsbFrontPanel.h
okFrontPanelDLL.h

I cant seem to find any “okFrontPanel.cpp” file in the OpalKelly directory.

It should have been okFrontPanelDLL.cpp

My apologies for the typo.

I dont have this “okFrontPanelDLL.cpp” file either in the installation directory/samples directory.

Can you send me this file? Or can I download it from somewhere?

Which version of FrontPanel do you have installed on your PC? The .cpp file should be in the API directory.

Start the FrontPanel Application and press F1.

I have FrontPanel 1.4.1 installed in my system. I have checked the API directory and there is only “okFrontPanelDLL.c” file instead of “okFrontPanelDLL.cpp”.

With *.c i get another set of errors:

------ Build started: Project: destester, Configuration: Debug Win32 ------
Compiling…
okFrontPanelDLL.c
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(451) : error C2065: ‘FARPROC’ : undeclared identifier
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(451) : error C2146: syntax error : missing ‘;’ before identifier ‘proc’
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(451) : error C2065: ‘proc’ : undeclared identifier
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(452) : warning C4013: ‘GetProcAddress’ undefined; assuming extern returning int
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(452) : error C2065: ‘HMODULE’ : undeclared identifier
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(452) : error C2146: syntax error : missing ‘)’ before identifier ‘dll’
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(453) : warning C4047: ‘==’ : ‘void ’ differs in levels of indirection from ‘int’
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(454) : warning C4013: ‘GetLastError’ undefined; assuming extern returning int
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(456) : warning C4312: ‘type cast’ : conversion from ‘int’ to ‘DLL_EP’ of greater size
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(466) : error C2143: syntax error : missing ‘{’ before '

c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(468) : error C2371: ‘dll_load’ : redefinition; different basic types
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(47) : see declaration of ‘dll_load’
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(470) : warning C4013: ‘LoadLibrary’ undefined; assuming extern returning int
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(470) : warning C4312: ‘type cast’ : conversion from ‘int’ to ‘DLL *’ of greater size
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(485) : error C2065: ‘HINSTANCE’ : undeclared identifier
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(485) : error C2146: syntax error : missing ‘;’ before identifier ‘hInst’
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(485) : error C2065: ‘hInst’ : undeclared identifier
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(485) : error C2146: syntax error : missing ‘;’ before identifier ‘dll’
c:\projects\fpga\opalkelly_projects\xem\part3\destester\destester\okfrontpaneldll.c(486) : warning C4013: ‘FreeLibrary’ undefined; assuming extern returning int
Build log was saved at “file://c:\Projects\FPGA\opalkelly_projects\xem\part3\destester\destester\Debug\BuildLog.htm”
destester - 11 error(s), 7 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

You can try emailing us at support at opalkelly dot com and we can get into deeper detail here.

But I suspect there to be something simple somewhere that is causing this waterfall of problems. A misplaced “;” can wreak havoc.

To be clear, though, you’re having these problems trying to build the unmodified version of DESTester that was included with your software installation? The one that was in the “CxxDLL” directory?