32

Using the Microsoft Driver Development Kit (DDK), this error plagued me as I attempted even to build the default drivers included with the DDK.

I had a some difficulty in tracking down the cause and solution through Google. In an effort to aid others who may experience this same problem, I am documenting it here.



Error: "fatal error U1087: cannot have : and :: dependents for same target"

Solution: Make sure that the directory you are building in contains no spaces.





There may be other causes and solutions to this error, so please post below if you have others. This is the solution that worked immediately for me.
user7116
  • 63,008
  • 17
  • 141
  • 172
KevenK
  • 2,975
  • 3
  • 26
  • 33
  • 4
    @sixlettervariables: the purpose of this thread was specifically to document the issue and solution, as was made rather clear by the original post. Nearly two years later, this is a top Google result for the corresponding error, and has conceivably been a useful resource for people experiencing this problem, as well as leading them to SO.com. The OP is effective at what it very clearly set out to do, and was left open ended for additional input from other users. The OP has value to the site and other users regardless of whether or not a '?' character appears. – KevenK Jun 06 '11 at 19:56

4 Answers4

30

Tthe solution to this problem is to ensure that there are no spaces in the build directory.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
KevenK
  • 2,975
  • 3
  • 26
  • 33
3

It's not just the build directory itself, e.g 'My Project'. I had the problem when the build directory was placed in the 'My Documents' directory.

Using the short version of the path works fine, no need to move your files.

This fails:

cd "D:\My Documents\My Projects\Project 1"
build

This works:

cd D:\MyDocu~1\MyProj~1\Projec~1
build
Dominic Clifton
  • 1,464
  • 1
  • 9
  • 6
1

Driver source code directory should have no white spaces.

user167439
  • 11
  • 1
0

This can also occur if the build state becomes excessively out-of-date, in which case it is fixed by a clean (-c).

jrk
  • 2,896
  • 1
  • 22
  • 35