News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

build of static lib and 3rd party sources binaries path

Started by ope, August 30, 2007, 08:17:39 AM

Previous topic - Next topic

mariocup

Hi,

I had been able to reproduce the behavior with the static lib wizard of Code::Blocks. The problem is, if the project file .cbp and the sources of the project are on different drives. In the attached file the project static_lib/static_lib.cbp is on e.g C:\temp\static_lib and the source file main.c on a network drive r:\tausch\mario\testx. The output directory in the project file is configured as build\Debug but instead of generating objects in object output dir C:\temp\static_lib\build\Debug they are generated in the source directory r:\tausch\mario\testx.

[attachment deleted by admin]

Biplab

#16
Quote from: mariocup on September 04, 2007, 03:49:48 PM
I had been able to reproduce the behavior with the static lib wizard of Code::Blocks. The problem is, if the project file .cbp and the sources of the project are on different drives. In the attached file the project static_lib/static_lib.cbp is on e.g C:\temp\static_lib and the source file main.c on a network drive r:\tausch\mario\testx. The output directory in the project file is configured as build\Debug but instead of generating objects in object output dir C:\temp\static_lib\build\Debug they are generated in the source directory r:\tausch\mario\testx.

I wrote this earlier that this behaviour is hard-coded.

IMHO, the fallback code should create the relative path of object file to C:\temp\static_lib\build\Debug\r\tausch\mario\testx.

There is only one, but a nasty, problem. In C::B every plugin handles file path creation/manipulation on it's own. I'm not sure if I make such changes, other parts would function normally or not.

I'll try to fix this issue. :)
Be a part of the solution, not a part of the problem.

Biplab

I've changed the object output creation of source files residing in different drive. Now the object files will be created inside the project's object output directory.

Example:
* Project object output dir: C:\Foo\obj\Debug
* Source: D:\Source\foo.cpp
* Obj file: C:\Foo\obj\Debug\D\Source\foo.o

I made some tests and it works well. It's in revision 4424.

@Mario and Ope,
Can you please test it with your projects to see if it's working well??  :)
Be a part of the solution, not a part of the problem.

mariocup

Hi Biplab,

I will try it and give you feedback tomorrow. Thx. :D

mariocup

Hi Biplab,

I have tested svn 4427 and TARGET_OUTPUT_DIR works fine for me. Thx again.

Related to the TARGET_OUTPUT_FILE there is also a strange behaviour we discussed in http://forums.next.codeblocks.org/index.php/topic,6556.0.html. It seems that codeblocks does not get the TARGET_OUTPUT_FILE correctly if different projects are opened, although the build works for the active target. Even a rebuild of a project will not fix the problem. Is there a workaround for this problem?

Biplab

Quote from: mariocup on September 06, 2007, 01:11:45 PM
Related to the TARGET_OUTPUT_FILE there is also a strange behaviour we discussed in http://forums.next.codeblocks.org/index.php/topic,6556.0.html. It seems that codeblocks does not get the TARGET_OUTPUT_FILE correctly if different projects are opened, although the build works for the active target. Even a rebuild of a project will not fix the problem. Is there a workaround for this problem?

I'm aware of this issue and you've submitted a bug-report earlier. I tried to fix that sometimes back. But I couldn't find a proper solution to this problem. I'll try to fix that. :)
Be a part of the solution, not a part of the problem.