Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do files get into the External Dependencies in Visual Studio C++?

I wonder why one of my projects has VDSERR.h listed under "External Dependencies" and another hasn't and gives me an "undefined symbol" compiler error about a symbol which is defined in there. How can I include this file in the other project as well?

like image 503
Felix Dombek Avatar asked Jul 20 '11 23:07

Felix Dombek


People also ask

In which file we can add external dependencies?

To add an external dependency, click Add External JARs, select the JAR file that you want to add, then click Open. Copy the JAR file to the shared-classes directory required.

Are references and dependencies the same?

A file reference doesn't create a build dependency, so it's possible to build the referencing project without building the dependent project, and the reference can become obsolete. (That is, the project can reference a previously built version of the project.)


1 Answers

The External Dependencies folder is populated by IntelliSense: the contents of the folder do not affect the build at all (you can in fact disable the folder in the UI).

You need to actually include the header (using a #include directive) to use it. Depending on what that header is, you may also need to add its containing folder to the "Additional Include Directories" property and you may need to add additional libraries and library folders to the linker options; you can set all of these in the project properties (right click the project, select Properties). You should compare the properties with those of the project that does build to determine what you need to add.

like image 73
James McNellis Avatar answered Oct 17 '22 14:10

James McNellis