User forums > Help
Define $object, $objects, $link_objects, etc
janknepper:
I wondered if there is any way (currently) to *define* how these variables are being generated.
Currently I have source files in different directories, but would like the .o files to be written in 1 directory, no subs. For some reason I have not been able to get Code::Blocks to do this.
It would ne nice however if there was some way to *define* the generation of $object by the build system and as of such of course the generation of $link_object, etc.
Any idea's?
Thanks!
Jan
AkiraDev:
Project > Properties > Targets should give you control on those parameters.
HTH
Game_Ender:
It really does not do exactly what you want it to do. Lets say I have this layout:
--- Code: ---/root
/src
/main
/extras
/include
/main
/extras
/obj
/bin
cbproject.cbp
--- End code ---
Now I want to put all my object files in the object directory like so
--- Code: ---/obj
/main
/myobject.o
/extras
/extraobj.o
--- End code ---
What CB does is this:
--- Code: ---/obj
/src
/main
/myobject.o
/extras
/extraobj.o
--- End code ---
It basically mirrors its source tree into the object directory. This even hapens if the project file is in its own sub directory. I think this a because problem because CB kind of is built around a project layouts that don't have a specific header and source directory. You can see this in the project file layouts, I always have separate src, and include directories and the codeblocks project files always have the double Source/src and Include/include structure. It is kind of annoying.
janknepper:
--- Quote from: AkiraDev on January 27, 2006, 03:20:54 am ---Project > Properties > Targets should give you control on those parameters.
--- End quote ---
No, as far as I can tell it just let's you use those parameters.
What I would like to do is something as:
$object=make_o($source)
or
$object=make_o($source_path)
A way to *define* how $object is being created/generated.
Thanks!
Jan
janknepper:
--- Quote from: Game_Ender on January 27, 2006, 03:39:16 am ---It basically mirrors its source tree into the object directory. This even hapens if the project file is in its own sub directory. I think this a because problem because CB kind of is built around a project layouts that don't have a specific header and source directory. You can see this in the project file layouts, I always have separate src, and include directories and the codeblocks project files always have the double Source/src and Include/include structure. It is kind of annoying.
--- End quote ---
It is more than annoying. Especially if files come more 10+ different directories.
I have tried to remove the -o $object option from the Advanced Compiler Options. That indeed puts the .o in the directory where I want them, but than $link_objects still refers to the .o's in the directory structure and thus will fail.
Thanks!
Jan
Navigation
[0] Message Index
[#] Next page
Go to full version