- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm trying to port an existing code base from PC to Mac. We have Composer XE 2011 update 4 installed on both machines (12.0.4.196 on pc and 12.0.4.184 on mac). Our code compiles on pc, but not on mac. Most of the issues are to do with how icc handles templates, with the mac version apparently being a lot stricter, i.e. having to redeclare typedefs when deriving from template base classes, needing "using BaseClass::myVar" when using a member variable in a template base class etc. Can anyone explain why these inconsistancies exist? The only reason I can think of is that the mac version is actually behind on template support, or that there are some subtle compiler options that i need to set up. Any thoughts anyone?
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Windows we emulate the installedversion of the Microsoft compiler and on Mac we emulate the installed version ofGnu compiler. If we did not do this then we would not be source and binary compatible and the system headers would not necessarily work correctly.
On Mac you cantry the-fms-dialect option which might help.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Most differences between icc on different platforms result from our effort to be as compatible and consistent as possible with the leading compiler on each platform. On Windows, that's MSVC++, on Mac it's gcc. The releases are in synch across platforms, so I don't believe that there's any way in which one is ahead of another. If the problems you're seeing are warnings or numbered errors, you can control their presence or absence with command line options (-diag-disable on mac).
If you can list some specific compilable examples I might be able to help you out.
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answers. I've tried the -fms-dialect option which looks like it should do the job nicely, but I'm having a few more problems. Firstly Iget problems with xmmintrin.h which pulls in if _MSC_VER is defined. After resolving that, I get lots of problems with tbb not compiling (paths not set up etc) which I find odd being as tbb are internal libraries that come with icc. Is the intention of the dialect switch that we should build our project against the headers that ship with the microsoft compiler as it sounds a bit dubious legally. I'll keep plugging away at it for the time being. Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any chance you could post a small test case that illustrates the problem?
Thanks!
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try undefining _MSC_VER like so:
-U_MSC_VER
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fantastic. That all worked a treat. Sometimes the solution is just staring you in the face. Thank you very much :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I submittedd a bug report about the problem with the xmmintrin.hheader file and the -fms-dialect option. So that should eventually be fixed. We will probably just disable the _MSC_VERmacro.Thanks for pointing out the problem.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page