FFTViewer Compile Issue

I’m trying to build FFTViewer from source on Win7, using CodeBlocks. I am getting the error –
Logic\dependencies\CyAPI\libCyAPI_fx3_GCC.a(CyAPI.o):CyAPI.cpp:(.text+0x495d): undefined reference to _Unwind_Resume' Logic\dependencies\CyAPI\libCyAPI_fx3_GCC.a(CyAPI.o):CyAPI.cpp:(.eh_frame+0xd3b): undefined reference to__gxx_personality_v0’


A little bit of googling suggests this might be due the libCyAPI being compiled with different gcc version. What version of gcc should I use, or how could I rebuild libCyAPI_fx3_GCC.a?

Hello,
I suggest to compile CyAPI.cpp yourself. You can get the source code for CyAPI from

Add the CyAPI.cpp file to FFTviewer project files. To be able to compile it with GCC you need to change the 3115 line error = fopen_s(&FwImagePtr, fileName, “rb”); into FwImagePtr = fopen(fileName, “rb”);
Also remove libCyAPI_fx3_GCC.a from project linker settings, because you won’t need it anymore. Now your project should compile.

Thanks, that got it to build. I had to make a change in CyAPI.cpp (change CreateFile() to CreateFileA(), and MessageBox() to MessageBoxA() ) to get it complile.

The app now runs, but it doesn’t see the USB interface. If I run the pre-built app from gitHub, the app sees the USB interface and I can pass the register test. When I build it, all I see is “No USB Devices Found” in the Connection Settings.

Do you think this is related to the unicode/ANSI change I had to make to CyAPI.cpp?

Yes, it appears to be related to unicode, but not because of your changes.
The CyAPI.cpp file should be added only to LogicDebug and LogicRelease build targets, because they are compiled without unicode defines.
So just remove CyAPI.cpp file from project and add it again, but this time leave only the LogicDebug and LogicRelease build targets selected. Then rebuild project.

I’m not sure I follow. If I leave out the CyAPI from the GUI project, then it can’t find find the CCyUSBDevice calls. Do I need to build the Logic first, and then link to that lib?

Yes, that’s exactly what you need to do.
Build logic with CyAPI, and then rebuild GUI. the GUI will find CCyUSBDevice calls inside logic library.