You are here:

C++/compiler flags to compile SSE2 code

Advertisement


Question
hello. I have obtained SSE2 code, but cannot compile it! I was told to use the -msse2 flag for g++ to compile. I am using Microsoft Visual C++ 2008 Express Edition - the GUI, not command line compilation. Where would I go too add (and what command would I add) in order to get the SSE2 code to compile?

Answer
Hi.  I don't have the Express Edition installed, but it should be about the same as the Professional Edition.

In the Solution Explorer, right click on the Project and go to Properties.  Under Configuration Properties, C++, Code Generation, find the option Enable Enhanced Instruction Set.  You can then enable SSE2 extensions in the drop down box.

Remember that each configuration has its own project settings, so you'll need to do this for debug and release (and any other configurations you might be using).

If you have any further questions, just let me know!

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joseph Moore

Expertise

I've been programming in one form or another since my brother taught me BASIC when I was 6. I've been programing professionally since I was 20, first web development with HTML, JS, DHTML, CSS, etc., then I became a video game developer, writing code in C, C++, C#, SQL, assembly, and various scripting languages. I've even written my own scripting languages, custom designed for the games I was making. I also dabble in Java, PHP, and Perl. I've worked on pretty much every aspect of game development, including graphics, audio, gameplay, tool, UI, input, animation, and physics.

Experience

I've been writing C++ code for 12 years, both on my own in my spare time and professionally.

Organizations
IGDA

Education/Credentials
Bachelor of Science in Game Design and Development, Full Sail University, Winter Park, FL

Awards and Honors
Salutatorian and Advanced Achiever Awards at Full Sail; Independent Games Festival Student Showcase winner, 2004; Featured article on Gamasutra about an experimental game developed in 2004

©2012 About.com, a part of The New York Times Company. All rights reserved.