Author Topic: Redirecting Objects output.  (Read 8701 times)

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
Redirecting Objects output.
« on: January 31, 2006, 05:11:15 pm »
Using rev1906...

I'm having a problem getting  my .obj files to get placed in the directory I have specified.   I set the Objects output dir to the directory to what I want (Objs directory where makefile is), but C::B keeps dumping them into an "Objs" directory where the .cbp file is located.  I also set the execution working directory to where the makefile is located.  I saved my projects by exiting C::B and restarting...which sometimes doesn't save all my settings, particulary custom make commands.

Here's my project tree

Software
---Products
------EFMSHDSL (.cbp file located here)
--------Objs  (C::B putting the objs here)
--------Build
----------App  (makefile and execution directory)
------------Objs (want objs here)
----------Boot  (another special build)
----------FlashProg (another special build)




Any ideas? 

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Redirecting Objects output.
« Reply #1 on: January 31, 2006, 09:19:36 pm »
Hello,

I have no problem in doing that. I just specifiy the new Obj directory (I use relative path) and after C::B stores the .o files there.

Best wishes,
Michael

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Redirecting Objects output.
« Reply #2 on: January 31, 2006, 10:26:44 pm »
Well..I just can't get it to work.  I give up.  If anyone wants to look at my project file, go ahead.  I've worked on this until I'm blue in the face.  My last try was to start from scratch and put the cbp file in a separate sub directory under the project.  No luck.

Also, the output parsing I could only get the work once.  Now, I don't know what's messed up.  It still recognizes errors and warnings in the build messages, but it won't open up the file with the error.

I guess it's back to my other editor for while :?

Thanks

[attachment deleted by admin]

takeshimiya

  • Guest
Re: Redirecting Objects output.
« Reply #3 on: January 31, 2006, 11:07:02 pm »
It could be a bug in the external makefiles handling. There have been some bugs with it lately.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Redirecting Objects output.
« Reply #4 on: January 31, 2006, 11:12:50 pm »
It could be a bug in the external makefiles handling. There have been some bugs with it lately.

If you 're using external makefiles, C::B has nothing to do with where your makefile puts the object files.
I think we must disable some text boxes that mean nothing in project properties when a makefile is used...
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: Redirecting Objects output.
« Reply #5 on: January 31, 2006, 11:47:55 pm »
I think we must disable some text boxes that mean nothing in project properties when a makefile is used...
Code: cpp
true;

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Redirecting Objects output.
« Reply #6 on: February 01, 2006, 02:43:45 pm »

If you 're using external makefiles, C::B has nothing to do with where your makefile puts the object files.
I think we must disable some text boxes that mean nothing in project properties when a makefile is used...

Okay, but I don't have this problem with other IDE's that I use with a external makefile build.

I'll keep investigating...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Redirecting Objects output.
« Reply #7 on: February 01, 2006, 03:00:39 pm »
Okay, but I don't have this problem with other IDE's that I use with a external makefile build.

I'll keep investigating...

There's nothing to investigate. Let me tell you once again, in case you didn't understand it.
C::B is not using makefiles to build its projects. It uses its own sophisticated build system. The only time it needs to call make, is if the project is using a custom makefile.
In this case, all C::B does is to call make with the appropriate arguments. Nothing more, nothing less.
As you may very well know, a makefile contains all the info needed to build a project. Including the generated objects directory, the filenames to generate, etc.
So, since you are using a custom makefile for your project, C::B can't do nothing more than just launch make.
You don't think that C::B should automatically edit your makefile? :lol:

And for those "other IDEs" where you don't see this problem, they 're probably using make for builds anyway and generate a makefile automatically each time before building the project.
This is not a custom makefile, it's an IDE-maintained makefile. Huge difference ;).

Btw, seeing you don't quite understand the build system, why are you using custom makefiles? Are you sure you need them? (just checking)
Be patient!
This bug will be fixed soon...

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Redirecting Objects output.
« Reply #8 on: February 01, 2006, 03:50:25 pm »
You don't think that C::B should automatically edit your makefile? :lol:
No, of course not :)

And for those "other IDEs" where you don't see this problem, they 're probably using make for builds anyway and generate a makefile automatically each time before building the project.
This is not a custom makefile, it's an IDE-maintained makefile. Huge difference ;).
Yes...and no.  See below.  But, I do understand your point :D
Btw, seeing you don't quite understand the build system, why are you using custom makefiles? Are you sure you need them? (just checking)

Yes, I'm sure we need an external makefile.  The makefile, which is a proprietray build file generated by GreenHills compiler, is shared amongst a group of engineers who are using different IDE enviroments(GreenHills, Multi-Edit,Codewright, etc.).  We need to maintain that build file in our version control system for consistent builds.

With Codewright, even though I have my projects files (in this case a .pjt file) in a separate directory as the GreenHills build/make file,  I'm able to execute the build file where it is located.  Hence, it dumps the objs right there.  I think the problem I'm having with C::B is that it executes where the .cbp file is located.  So, I've been playing around with the custom variables to "trick" it into running make out of the build directory.  Not having much luck :?

My last resort will be to locate the .cbp file inside the build directory which I really do not want to do.

Thanks for your patience :D

P.S.  Sorry for hosing up the post! I tried to fix it.

Edit by mandrav: fixed formatting.
« Last Edit: February 01, 2006, 03:57:51 pm by mandrav »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Redirecting Objects output.
« Reply #9 on: February 01, 2006, 03:56:45 pm »
Ah, I see. You should have told this from the start ;).
So all you need is to specify the directory where make is launched from. Right?
Be patient!
This bug will be fixed soon...

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Redirecting Objects output.
« Reply #10 on: February 01, 2006, 04:13:06 pm »
Ah, I see. You should have told this from the start ;).
So all you need is to specify the directory where make is launched from. Right?

Yes.  That is correct.