View unanswered posts | View active topics
Forum rules
1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.
|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
g40
|
Post subject: VS 2008 problem with setjmp.h Posted: Mon Nov 15, 2010 4:44 pm |
|
Joined: Mon Nov 15, 2010 12:58 pm Posts: 7
|
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
|
|
Top |
|
|
Sergey.Bochkanov
|
Post subject: Re: VS 2008 problem with setjmp.h Posted: Mon Nov 15, 2010 6:09 pm |
|
|
Site Admin |
Joined: Fri May 07, 2010 7:06 am Posts: 927
|
Can you post your project files? I can't reproduce this behavior with my installation of MSVC 2008 and project created by me...
|
|
Top |
|
|
g40
|
Post subject: Re: VS 2008 problem with setjmp.h Posted: Mon Nov 15, 2010 6:23 pm |
|
Joined: Mon Nov 15, 2010 12:58 pm Posts: 7
|
Hello Sergey
Thanks, I will assemble the smallest possible project which demonstrates the problem and upload.
|
|
Top |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 30 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|