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

Posted on 2005-05-16
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
    LVL 48

    Accepted Solution

    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

    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

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    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++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now