User forums > Using Code::Blocks

build of static lib and 3rd party sources binaries path

<< < (4/5) > >>

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:

--- 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.

--- End quote ---

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. :)

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??  :)

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.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?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version