User forums > General (but related to Code::Blocks)
Advice please on mixed languages
mariocup:
Hi johne53,
you can not set Build options for assembler files using the project properties. The only way to set different options from the project settings, to select a file and can the properties in the way that you have already done. If you need to set a list of assembler options just define a customer variable asmopts in your project and use as special command.
$compiler $asmopts $includes -c $file -o $object
I do not understand why you want to get build option popup menu. Do you mean the project properties/build options????
johne53:
Thanks Mariocup. I might not be describing my requirement very well. What I mean is this.... let's say I open a workspace - within which are several projects. On the left-hand side of C::B I can then select any project where I can then see its Source files, Header files and Other files. If I now right-click on a source file, a menu appears with these options:- Open / Open With / Rename file / Remove file from project / Build file / Properties. This is the menu that I usually use for building a single source module (the same as CTRL+SHIFT+F9).
However, with this particular source file, the options offered are:- Open / Open With / Rename file / Remove file from project / Properties (note: there is no option to Build file). I hope that makes it a bit clearer.... :)
mariocup:
Hi johne53,
ok now I understand. Since a few weeks, assembler sources are listed under the Resource ASM Sources and if you select a assembler file e.g name.s you get the entry build file in the context menu, but this works only after a cleanup. The file types and the the type of resources are saved in the configuration file default.conf. So if you want to get ASM Sources entries in the project view and the correct context menu do the following steps:
Copy the default.conf to default.conf.org (Home directory .codeblocks or APPDATA under windows). Start codeblocks and test if your assembler file is listed under ASM Sources and if you have the context menu entry: build file.
Another possibility to restore your settings after renaming default.conf is using the application cb_share_console, which is useful to get settings from a configuration file and save them to a new one.
MortenMacFly:
--- Quote from: mariocup on September 16, 2007, 12:04:11 am ---Another possibility to restore your settings after renaming default.conf is using the application cb_share_console, [...]
--- End quote ---
I guess you mean cb_share config. ;-)
Anyway - anther possibility is to to the following:
- open C::B
- click menu "project" -> "project tree" -> "edit filetypes and categories"
- select "Set default" and hit OK.
With regards, Morten.
johne53:
Sorry guys, I must have missed something with those suggestions....
--- Quote from: mariocup on September 16, 2007, 12:04:11 am ---Since a few weeks, assembler sources are listed under the Resource ASM Sources and if you select a assembler file e.g name.s you get the entry build file in the context menu, but this works only after a cleanup.
--- End quote ---
How long ago is "a few weeks"? My current copy is dated 5th August 2007 but even though I tried your suggestions, I couldn't make any ASM Sources appear.
--- Quote from: MortenMacFly on September 16, 2007, 11:12:23 am ---
Anyway - anther possibility is to to the following:
- open C::B
- click menu "project" -> "project tree" -> "edit filetypes and categories"
- select "Set default" and hit OK.
--- End quote ---
I don't have a "Set default" option in that dialog. Is it something that appeared since August 5th?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version