Multiple basetsd.h in my include paths... seem to need both, suggestions?

Posted on 2009-04-27
Last Modified: 2013-12-14
I have a small application that I compile and run in Visual Studio.  I'm running Windows XP Pro with Visual Studio 6 and 2008 installed.  The application makes use of the iphlpapi that comes with the Microsoft SDK.  However, I cannot seem to arrive at the magic to make this thing compile.  This is my directory list for includes:

D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
D:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE

The problem is that the first entry has a basetsd.h file that does not have a UINT16 declaration that other Microsoft header files need.  The last line DOES have a file with the declaration, but this header file is ignored.

I'm adverse to modifying core files provided by the vendor.  Anyone have an idea how to resolve this?
Question by:charles_gilley
    LVL 3

    Accepted Solution

    - Select project Properties (right click your project)
    - Expand the C/C++ folder and select General
    - Click the "Additional Include Directories" and set the folders you want

    Author Comment

    BalkisBr - when you give me these commands, what version of VS are you using?  I have VS6, and the way I would go about doing this is to go to Tools -> Options -> Directories.  
    However, I don't think I made myself clear, the problem is that I have two files from MS that are colliding with each other.  The first is pulled in from the first include path, occluding the last path I've added.  If I re-arrange, or drop any entry, it just causes more trouble.

    Author Comment

    BalkisBr - ok, I'm going to guess you are in VS2008 or something more modern than VS6.
    LVL 3

    Expert Comment

    I'm not using VS6 now,
    tomorrow i can take a look on vs6 to remember the folders and provide a better assistance for you.

    Meanwhile, have you tried to include the full path to the correct file?

    Can you copy paste the errors?

    Author Comment

    What a joke.  Microsoft, please go learn something from Unix.  Using Windows Explorer, I went searching for basetsd.h, none to be found.  The odd part is that the other Windows Explorer I had open was looking right at one.  A little search revealed that Windows Explorer (as well as Microsoft Desktop search) is braindead when searching or files.
    So, I downloaded FileBoss V2 (so far looks like a slick piece of s/w), and found on my machine 4 different versions of basetsd.h.  This is only after 6 months on this laptop.  I went back to the old laptop (5 year veteran) - just a single file. Hmmm.
    To resolve the issue, I added the "program files\Mcrosoft Platform SD\Include\ folder to the top of the file search path, and I removed the reference to the V6.0a SDK.  Application compiles correctly now.

    Author Closing Comment

    Credit given for taking a shot at it.  Please see my last response for actual correction.  Note: be careful what you install.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
    A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now