News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Compiling x86 assembly instructions

Started by johne53, September 18, 2009, 02:05:32 PM

Previous topic - Next topic

johne53

I'm moving a project to C::B (currently, it builds using a command-line utility called scons). One of the modules has the extension ".s" and it seems to be standard x86 assembly language (lots of push / pop / mov instructions etc). When I add this file to my C::B project it gets grayed out. In other words, C::B doesn't seem to know how to build it. Scons handles it like this:-

g++ -c libs/sse/sse_functions.s -o libs/sse/sse_functions.o

So obviously, g++ knows how to build the module. Would C::B know what to do if I changed the extension to something else?

[Edit...] BTW, I tried the extension ".asm" but that wasn't recognised either....  :(

Ceniza

I just tried adding a .s file to a project with a very simple instruction, and it compiled. What version of Code::Blocks are you using?

johne53

Thanks, you just beat me to it! I just realised that this does work if I add ".s" files to my copy of C::B that runs under Linux (with the gcc compiler selected). But it doesn't work if I do the same thing with my copy of C::B that runs under Windows (Cygwin/gcc compiler selected). I just see a message saying "nothing to do". Both versions of C::B are quite old - though strangely, I think the Windows version is probably newer. I wonder if I should upgrade to something more recent?

johne53

Hmmm.... this morning it seems to be working (after a fashion). Late yesterday I discovered that I could build the file by opening it in my C::B editor and pressing Ctrl+Shift+F9. But it didn't get included if I just built the project by pressing Ctrl+F9. Also, if I right click on the filename (in the left-hand tree window) the usual popup menu appears but it doesn't have the "build file" option that I normally see with other source files.

The popup menu problem is still the same this morning (i.e. somewhere along the line, this file isn't getting recognised as a valid source module). However, Ctrl+F9 now seems to be building it... ???