Sign in to follow this  

Using external ASM Compiler With MSVC++ 8

This topic is 4093 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
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

This topic is 4093 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this