user1558168
user1558168

Reputation: 67

Compiler finds header files but not cpp files?

I've added a folder to the 'Additional Include Directories' of the project which contains all of the additional .cpp and .h files my program needs to run. The compiler finds the header files just fine, but when I try to build the project I get the following:

1>  Node.cpp
1>c1xx : fatal error C1083: Cannot open source file: 
'..\..\..\..\..\Dropbox\PDN_dropbox\Code\C++\INCLUDE FILES\Node.cpp': No such file or    directory

How can Visual Studio find my headers but not the .cpp files if they are in the same folder?

I'm using Visual Studio 2013.

Upvotes: 2

Views: 1265

Answers (1)

Anton
Anton

Reputation: 3203

  1. Visual Studio does not automatically add source files from include directories. You have to add them manually (Main menu → Project → Add existing item).
  2. Check if the file path isn't too long. See: "No such file or directory", but the file exists.

Upvotes: 1

Related Questions