Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / August 2007

Tip: Looking for answers? Try searching our database.

Mixed assemblies and enhanced instruction set

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrea Sansottera - 11 Aug 2007 16:02 GMT
I'm using Visual C++ Express 2005. I get an error when I try to
compile code with both /arch:SSE and /clr options.

cl : Command line error D8016 : '/arch:SSE' and '/clr' command-line
options are incompatible

Why is happening? According to the documentation it should be possible
(of course SSE instructions should be used just for native code).

"When compiling with /clr (Common Language Runtime Compilation), /arch
will have no effect on code generation for managed functions. /arch
only affects code generation for native functions."

http://msdn2.microsoft.com/en-us/library/7t5yh4fd(vs.80).aspx

Of course I can work around this error by building an SSE-optimized
native DLL and then a mixed DLL which depends on the previous one and
uses just the standard instruction set, but it's going to increase
complexity with no good reason.

Anyone getting the same error? I'm also wondering if I should report
this as a bug since the documentation does not specify the correct
behavior of the compiler. Thanks in advance, Andrea.
Ben Voigt [C++ MVP] - 13 Aug 2007 18:40 GMT
> I'm using Visual C++ Express 2005. I get an error when I try to
> compile code with both /arch:SSE and /clr options.
[quoted text clipped - 15 lines]
> uses just the standard instruction set, but it's going to increase
> complexity with no good reason.

You shouldn't need a second DLL.  Just specify /arch for the native .cpp
files, and /clr for the managed ones.

> Anyone getting the same error? I'm also wondering if I should report
> this as a bug since the documentation does not specify the correct
> behavior of the compiler. Thanks in advance, Andrea.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.