home Forums # Technical Support Unhandled exception at 0x751a9617 in test.exe Reply To: Unhandled exception at 0x751a9617 in test.exe



I managed to create from scratch a Visual Studio C++ Solution using fuzzylite v4.0. I ran into issues mostly because I do not use Visual Studio, but I still managed to successfully run your example. I created an empty project with a single main.cpp in which I copied your code. Notice that I build fuzzylite from console and use the library in my empty project. Here are the issues I ran into:

  • As you mentioned, there is an issue with unreachable code in fuzzylite/Function.cpp, which is solved as you did, or alternatively adding #pragma warning(disable:4702) //Unreachable code under the Windows definitions in fl/fuzzylite.h
  • I had to compile fuzzylite using cmake . -G"NMake Makefiles" -DFL_DEBUG=ON to avoid error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL'.... This error refers to the case when fuzzylite is built in release mode, but the VS solution is built in Debug mode. (I did not know how to build the solution in release mode)
  • I added fuzzylite-static-dbg.lib to the linked libraries in the project properties, and I also needed to add the dbghelp.lib linked library.
  • In the project properties, in C++ Code Generation, I have Enable C++ Exceptions: Yes with SEH Exceptions (/EHa)
  • I also added the directories: fuzzylite and fuzzylite/bin to include and library in VC++ directories (project properties).

Try the steps mentioned above and let me know if it works now.