User forums > Using Code::Blocks
Is there a way to set a object file name base on the full name of the source ?
(1/1)
mrguo:
There are two source files with a same basename in a same directory, such as : "a.cc" and "a.cu", like the sources of mxnet , During the building, there are two object files with a same name "a.o" might generate and overwrite each other, then, a lot of "undefined reference to" errors generated when try to link them together.
My questions : is there a way to set a object file name base on the full name of the source file ? in other words, can I set the C::B and let it compile the "a.cc" to "a.cc.o" and "a.cu" to "a.cu.o" , and link them together ? or is there a way to change the both $object and $link_objects command macros of C::B instead ?
Thanks!
stahta01:
With an CB project open.
Project -> Properties
Tab: Project Settings
Checkbox: "Object Names Generation"
Tim S.
mrguo:
--- Quote from: stahta01 on October 15, 2020, 04:05:35 am ---With an CB project open.
Project -> Properties
Tab: Project Settings
Checkbox: "Object Names Generation"
Tim S.
--- End quote ---
Great, it works!
Thank Tim very much ! and C::B is very nice !
Navigation
[0] Message Index
Go to full version