forum.alglib.net

ALGLIB forum
It is currently Sun Apr 28, 2024 5:05 pm

All times are UTC


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.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: VS 2008 problem with setjmp.h
PostPosted: Mon Nov 15, 2010 4:44 pm 
Offline

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
 Profile  
 
 Post subject: Re: VS 2008 problem with setjmp.h
PostPosted: Mon Nov 15, 2010 6:09 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
Can you post your project files? I can't reproduce this behavior with my installation of MSVC 2008 and project created by me...


Top
 Profile  
 
 Post subject: Re: VS 2008 problem with setjmp.h
PostPosted: Mon Nov 15, 2010 6:23 pm 
Offline

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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 317 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group