News:

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

Main Menu

compile multiple files from different location into one folder

Started by shenc, February 02, 2017, 05:15:40 PM

Previous topic - Next topic

shenc

I have a project with multiple files from different locations.  I add them to this project.  I want to build those object files into one folder called ./obj and link them.
Say I have those files in folders

/home/me/A1/A2/a2.cpp
/home/me/A1/A3/a3.cpp

/home/me/B1/B2/b2.cpp
/home/me/B1/B3/b3.cpp

CB project in
/home/me/prj/ab.cbp

I want all objects build into folder  (define objects output dir:  obj/  in project properties)
/home/me/prj/obj

By default, CB build those source files and output them to

./obj/A1/A2/a2.o
./obj/A1/A3/a3.o
./obj/B1/B2/b2.o
./obj/B1/B2/b3.o

This is not I wanted.  Since ./obj do not have those folder tree .
Any suggestion?
Thanks


oBFusCATed

Why do you care? C::B does this to prevent multiple files from different folders that are named the same to generate the same object file and thus prevents hard to debug issues.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

shenc

Because other team member needs this.  Anyway, I find the solution.  In advance setting use flat option.


oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]