How to tell VC++ .Net to include 3rd party header files and libs

Posted on 2005-05-16
Medium Priority
Last Modified: 2010-04-24
The last time I used a C++ compiler, I used Borland C++, where I was in full control of telling it what the include directories were and what libs to link in.  Now that I'm using VC++ .Net, I'm somewhat confused as to where to start.  I have a 3rd party library in c:\id3 with subdirectories include and lib, and lets say the filenames are id3.h and id3.lib.  Now how do I tell VC++ .Net to look there for files?  

Also, where do I put the #include statement, in the form.h or form.cpp file?  

It seems odd to me that if I add a button to a form, then go to add code to the click event, VC++ wants to put code in a form.h, and not form.cpp
Question by:ALau
  • 2
LVL 48

Accepted Solution

AlexFM earned 2000 total points
ID: 14017121
Tools - Options - Projects - VC++ Directories. Select Inclide files in the Directories combo and add c:\id3 to the list. Select Library files and add libraries directory to the list.
LVL 48

Expert Comment

ID: 14017135
VC++ Forms designer builds inline function implementation. I think because this is the same program which works also for C# and .NET. You can manually move function implementation to .cpp file using general C++ systax rules which are the same in Microsoft C++ and Borland C++.
#include statement is added according to your needs. It is better always to add #include lines to .cpp files and not .h files to reduce dependencies. Sometimes this is impossible (for example, if you use class member of type B in class A, and B.h must be included to A.h).

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question