Jump to content
  • Advertisement
Sign in to follow this  
Unreal

Using external ASM Compiler With MSVC++ 8

This topic is 4308 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

:D Hello there! :D I am working on a Math lib that uses SSE and 3DNow for some stuff. I want to Compile on MSVC 8 but also on GCC... go I have to write two times the ASM code (cause I write it inline). Some ppl told me to use some other external compiler (NASM for example) so I will not write the ASM code twice. And then to link the object file from NASM with the Project. But i dont know how to do that : Anyone can show me the steps to do this? Or have some turorial/guide on th internet? ( I also want the same thing for GCC under Linux :P ) thanks for your time! :D

Share this post


Link to post
Share on other sites
Advertisement
I'm not aware of any particularly straightforward or well explained ways to do that, though it is possible - I'm working on a project which does use NASM under MSVC and GCC, precisely to avoid having to write everything twice. In MSVC (using the IDE as the build system), the .asm files are set to use the Custom Build Tool, with nasm being called on the command-line ("nasm.exe -f win32 "$(InputPath)" -o "$(IntDir)\$(InputName).obj"") and MSVC told about the appropriate .obj output file ("$(IntDir)\$(InputName).obj"), which (as far as I can tell) it will correctly link into the program. In GCC, the nasm command is just added to the Makefile in the appropriate places - but "appropriate" depends heavily on how your build system works, e.g. whether it's a hand-maintained project/Makefile or via something like Premake (which we use, but had to modify so it'd handle stuff like NASM).

Edit: How odd - this post got automatically submitted before I finished writing it...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!