visual studio 2003 and clearcase

B

Budyanto

Hi,

I have a visual c++ project that refuses to build when the project is
in clearcase. It kept complaining that it could not open an include
file. I'm pretty sure that all my include paths are set correctly
because other files in the same directory could be included
successfully. In fact I did not include this file directly. It was
included from a file I included. But I also tried including it directly
and it could not be opened also.

If I copy the whole project structure out of clearcase everything
builds ok. Has anybody seen similar problems?

I have checked the permissions on the file and it was readable.

Any clues?

Thanks
Budyanto
 
W

www.fruitfruit.com

Budyanto said:
Hi,

I have a visual c++ project that refuses to build when the project is
in clearcase. It kept complaining that it could not open an include
file. I'm pretty sure that all my include paths are set correctly
because other files in the same directory could be included
successfully. In fact I did not include this file directly. It was
included from a file I included. But I also tried including it directly
and it could not be opened also.

If I copy the whole project structure out of clearcase everything
builds ok. Has anybody seen similar problems?

I have checked the permissions on the file and it was readable.

Any clues?

Thanks
Budyanto
If you are using dynamic view, try rebuild all.
 
G

Guest

If you have a dynamic view, this can be caused by wrong
file permissions on the server side - check this.
Also try to disable your antivirus temporary.

--PA
 
B

Budyanto

Pavel said:
If you have a dynamic view, this can be caused by wrong
file permissions on the server side - check this.
Also try to disable your antivirus temporary.

--PA

I am actually able to see the file on the filesystem. In fact I can
open it manually. So I think the permission is ok. However during a
compile, visual studio cannot find it but it can find other files in
the same dir.

I have also tried disabling anti-virus and still the same problem.
 
W

www.fruitfruit.com

Budyanto said:
I am actually able to see the file on the filesystem. In fact I can
open it manually. So I think the permission is ok. However during a
compile, visual studio cannot find it but it can find other files in
the same dir.

I have also tried disabling anti-virus and still the same problem.

There may be multiple header files with the same name but of different
version. Change property of the project to show include files to check
if some file is included from unexpected path.
 
B

Budyanto

Ok I Finally figured it out.

It's got to do with the maximum filename length allowed in windows
(260).
It'd be nice if visual studio gives a better error message. You've got
to have a filename of exactly 260 characters for visual studio to give
a buffer overrun error. If you have a filename more than 260 chars
long, visual studio says file not found. Very misleading error!!

So my project is in M:\a\b\c and I specified a relative include path
...\..\x\y\z.

Visual studio expands the whole path as M:\a\b\c\..\..x\y\z. With the
clearcase viewname and enough depth in the directory structure this
path gets too long.

One interesting thing is that if you change the Debug Information
Format to "Program Database for edit and Continue" visual studio
evaluates the path as M:\ax\y\z. It somewhat makes the total path a
little bit shorter. And that fixes my problems.

Budyanto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top