- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just done verifications with different versions/editions ofVisual Studioand MinGW. Here are results:
- Visual Studio 2005 Professional Edition- 'copy_exception' is not supported
- Visual Studio 2008Express Edition- 'copy_exception' is not supported
- Visual Studio 2010Express Edition- 'copy_exception' issupported in 'exception' header file
-MinGW v3.4.2- 'copy_exception' is not supported
I don'tthinkthat Microsoft will remove that support inVisual Studio 2012.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I bet it will since it is out of C++11 standard.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I bet it will since it is out of C++11 standard...
That is possible. But, Microsoft is "famous" for braking or ignoring,too some degree, standards. OpenGL and OpenMP are
the best examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like you're wrong. Currently Microsoft make sure to be as close as possible to the C++ standard, and the previous naming was intended to provide the functionality before standardization, making it obvious that if you used it you would be potentially subject to need to change the code in former versions of the compiler.
I don't know what you mean by OpengGl?
--------
So, I took the last TBB release file and tryed to compile the tbb project in VS2012. After having replaced std::copy_exception to std::make_exception_ptr, I got this strange error and I can't find how to fix it:
2>atomic_support.obj : error LNK2026: module unsafe for SAFESEH image. 2>lock_byte.obj : error LNK2026: module unsafe for SAFESEH image. 2> Creating library E:\[...]\tbb_debug.lib and object E:\[...]\tbb_debug.exp 2>E:\[...]\tbb_debug.dll : fatal error LNK1281: Unable to generate SAFESEH image.
Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just looked at MSDN and your simplesolution looks good. Also, this is whatMSDN says:
Error LNK2026:
/SAFESEH was specified, but a module was not compatible with the safe exception handling feature. If you want to use
this module with /SAFESEH, then you will need to recompile the module using the Visual C++ .NET 2003 (or later) compiler.
Did you try to re-build the TBB librarywith /SAFESEH?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is possible. But, Microsoft is "famous" for braking or ignoring,too some degree, standards. OpenGL and OpenMP are
the best examples
IIRC OpenGL is layered on the top of Direct3D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you try to re-build the TBB librarywith /SAFESEH?
It IS when I have this flag set that I have this error.
What I did, to be precise, is :
1. get the TBB sources archive file
2. open tbb project file in VS2012, which trigger the automatic project conversion (because the other one was from older vs version)
3. after project conversion, I have a cmake script injecting this tbb project in my big set of projects
So, the /SAFESEH flag is set "by default".
It's the assembly code makes the flag trigger the link error. If I set /SAFESEH:NO it works.
I checked: the problem occurs only with converted project files as the compiler needs to be sure it is compatible with the new runtime. So, here the problem is that it would compile if the assembly code was not present (and considered not compatible with the crt or something like that). Compiling without the flag might hide a potential problem if I understood correctly.
I guess a good way to fix this would be to use std::atomic instead of providing the assembly code, OR to provide it in a way that makes it compiled by the C++ compiler instead of a separate compiler (because it seems it's compiled separately.
My understanding of the problem is obviously not complete, but I also need to be sure that using tbb on a recent VS compiler will no generate hard to spot problems...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2. open tbb project file in VS2012, which trigger the automatic project conversion (because the other one was from older vs version)...
My understanding of the problem is obviously not complete, but I also need to be sure that using tbb on a recent VS compiler will no generate hard to spot problems...
Unfortunately, I can't verify it because I have Visual Studios 2005 Pro, 2008Pro / Express and 2010Express, and
there are no any plans to buy the2012 version.
I just checked a version of TBB installed on my primary development machine and it is aCommercially Alligned version 4 Update 3.
Also, there are only 5 *.asm files in different TBB folders. What asm-file is causing that problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. get the TBB sources archive file
2. open tbb project file in VS2012, which trigger the automatic project conversion (because the other one was from older vs version)
3. after project conversion, I have a cmake script injecting this tbb project in my big set of projects
So, the /SAFESEH flag is set "by default".
It's the assembly code makes the flag trigger the link error. If I set /SAFESEH:NO it works...
I verified Update 1 and Update 3 of TBB version 4. For a 32-bitTBB DLL librarytwo asm-files are always compiled:
..\ia32-masm\lock_byte.asm
..\ia32-masm\atomic_support.asm
andfor both asm-files a project option'Use Safe Exception Handlers' was set to 'No' ( in both TBB releases ).
It looks like some changes are made in a latest release of TBB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not clear. I think TBB developers should explain why the option was changedto 'Yes'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just upgraded to v4.1 Update 2 and this "error LNK2026: module unsafe for SAFESEH image." problem isn't fixed yet.
It's annoying because I can't automate easily the change in the VS project file and I have to remember what it was about each time I upgrade TBB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just upgraded to v4.1 Update 2 and this "error LNK2026: module unsafe for SAFESEH image." problem isn't fixed yet.
It's annoying because I can't automate easily the change in the VS project file and I have to remember what it was about each time I upgrade TBB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I've the same problem & found the solution, it's simple... just enable safeseh for atomic_support.asm & lock_byte.asm,
(right click the asm files: Properties\Microsoft Macro Assembler\Advanced\Use Safe Exception Handlers)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once again, the fix is easy and already reported, but hard to automatize with scripts to integrate tbb into a project and be able to update it easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right,
We are looking how to support all 3 versions of visual studio without such issues and not introducing extra overhead...
--Vladimir
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page