forum.alglib.net http://forum.alglib.net/ |
|
VS 2008 problem with setjmp.h http://forum.alglib.net/viewtopic.php?f=2&t=120 |
Page 1 of 1 |
Author: | g40 [ Mon Nov 15, 2010 4:44 pm ] |
Post subject: | VS 2008 problem with setjmp.h |
Bizzare error this ... compiling with VC++ 2008 Pro. I have set up a standard Win32 project to build all alglib files with precompiled headers etc. It all builds nicely with /W4. Typical command line is: cl /Od /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Gy /Yu"stdafx.h" /Fp"Profile\alglib.pch" /Fo"Profile\\" /Fd"Profile\vc90.pdb" /W4 /c /Zi /TP .\ap.cpp Now, when compiling code which #includes dataanalysis.h I get the following error: u:\vs2008\VC\include\setjmp.h(256) : error C2059: syntax error : '...' u:\vs2008\VC\include\setjmp.h(256) : warning C4297: 'longjmp' : function assumed not to throw an exception but does I have no idea why. Same flags etc. The work-around (serious hack) is this: In ap.h // JME #define SETJMP_HACK #ifdef SETJMP_HACK #define jmp_buf void #else #include <setjmp.h> #endif In ap.cpp // JME #ifdef SETJMP_HACK #ifdef jmp_buf #undef jmp_buf #endif #include <csetjmp> #endif Any clues on this most welcome. Thx++ Jerry |
Author: | Sergey.Bochkanov [ Mon Nov 15, 2010 6:09 pm ] |
Post subject: | Re: VS 2008 problem with setjmp.h |
Can you post your project files? I can't reproduce this behavior with my installation of MSVC 2008 and project created by me... |
Author: | g40 [ Mon Nov 15, 2010 6:23 pm ] |
Post subject: | Re: VS 2008 problem with setjmp.h |
Hello Sergey Thanks, I will assemble the smallest possible project which demonstrates the problem and upload. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |