News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Special compiler syntax (KEIL)

Started by Schlumie, October 11, 2006, 10:40:18 AM

Previous topic - Next topic

Schlumie

I try to use KEIL C166 compiler with CodeBlocks. There are a view problems i faced, maybe someone could help me, and/or add a feature to get those kind of compiler to work.
Problem 1: Include dirs are specified with   INCDIR(Path)   so if a define INCDIR( as Includedirective, the ) is then missing....  I did a workaround and give those INCDIRs into the "OTHER OPTIONS" tab....  so not a really big problem..this works allready for me..
Problem 2: The linker need the objectfiles seperated with , not with space...  this is a problem, beause theres no way to define a objectfile seperation character.....

Is there a possible workaround, or is it possible to add such a feature ?
PS:
A also use the Metware ARC Compiler with codeblocks, and it works perfect!!!

Schlumie

I allread copied a compiler and changed everything so far. Compiling works, but i cant find a option for a object seperator.... my command line macro for the linker is:
$linker $libdirs $link_objects TO $exe_output $link_resobjects $link_options $libs
The $link_objects get translated to the objs seperated by spaces...  i didnt find a option for that, only for the whole option prefixes etc. ...
There should be an option in the Others tab to specifiy such a seperator....
There is also only a option for a "Add header file search path" PREFIX and not a pattern a need ... i need "INCDIR(%O)" to be able to specify the ) and not only "-L" like for the GNU GCC.... this would also be a nice feature....

tiwag

#2
just saw that too

an idea, can't you put the comma ',' in the libs list (adding ',' to the library name) ?

in the Linker tab, e.g.

lib1,
lib2,
lib3

Schlumie

This could be an workaround for the libs, but a dont have any libs just objects. This objectlist is automaticly created from codeblocks from the projectlist. I think a have to add this features myself...(like the union codecompl. support..)

Schlumie

I looked into the source and saw, that there is a possibility to add an + or - before objectfilenames... i think i will expand this feature to the nedded , .

Pete317

My workaround for the linker problem is to create a linker command file,  and use: $linker @$(PROJECT_NAME).lnk as the linker command line macro.
It's not very elegant, and you have to manually edit the linker command file, but it works.

Hope this helps.

Schlumie

Thank you! But my topic is 2 years old. I made a special token like the + and - (like i menditioned before). It is working, but I stoped using codeblocks for Keil, just for my other special compilers like Metaware ARC (Codeblocks is really create on this!). Your solution has the drawback, that you allways have to change the linker file if you add new files. I just want to use as much features from codeblocks for the keil compiler...