Author Topic: Possible to include external files into a project?  (Read 4227 times)

Offline asdfcb

  • Single posting newcomer
  • *
  • Posts: 4
Possible to include external files into a project?
« on: April 29, 2008, 05:27:48 am »
Hi,

I try to add source files outside the project directory by "Add files recursively". However, after restart Code::Blocks, I can no more access these files from the IDE browser because Code::Blocks adds the project directory path to each external file path.

For example, I add files in \\host\dir to my project in C:\workplace\ws1, then Code::Blocks will turn the file path of each source file to be C:\workplace\ws1\\host\dir\file1.

Any configuration to solve my problem?

Thanks,
Zen

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Possible to include external files into a project?
« Reply #1 on: April 29, 2008, 07:22:51 am »
I can not confirm this behaviour on debian with svn5021.

Which OS do you use ?
Which version of C::B ?

Offline asdfcb

  • Single posting newcomer
  • *
  • Posts: 4
Re: Possible to include external files into a project?
« Reply #2 on: April 29, 2008, 08:19:31 am »
Code::Blocks 8.02 on Windows XP

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Possible to include external files into a project?
« Reply #3 on: April 29, 2008, 10:37:33 am »
I just did a fresh install on a clean (as clean as XP can be) and uptodate XP box.

Then I created two test projects (both console applications),
added the file from the first to the second project with add recursively,
closed C::B and saved the project when C::B asked me for,
reopened C::B and everything works as expected.

Offline asdfcb

  • Single posting newcomer
  • *
  • Posts: 4
Re: Possible to include external files into a project?
« Reply #4 on: April 29, 2008, 11:29:12 am »
Hi,

Thanks for your help.

I tried again. You are right. When the external directory is in a local disk everything is ok, but in my case I want to include some files in a remote samba server. So the path is like \\192.168.1.1\dir\..., and C::B seems will add the project path to such a path, like C:\workspace\ws1\192.168.1.1\dir\...

Any way to solve this problem?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Possible to include external files into a project?
« Reply #5 on: April 29, 2008, 01:21:37 pm »
You can try to map the network-path to a drive-letter.
For me this works.

Offline asdfcb

  • Single posting newcomer
  • *
  • Posts: 4
Re: Possible to include external files into a project?
« Reply #6 on: April 29, 2008, 03:37:25 pm »
I tried and it works (though I still think it is not a straightforward solution).
Thanks!