Link to home
Start Free TrialLog in
Avatar of ESQuicksall
ESQuicksallFlag for United States of America

asked on

Search Microsoft include places before my places

I am using Microsoft VC6. I want to search for .h files in the Microsoft places before my places. Is there a way?
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ESQuicksall

ASKER

I can't change the source because it is common source between Linux and Microsoft. So I'm hoping I can tell VC6 to search the Microsoft places before my places.
Have a wrapper for your custom stuff

MyHeader.h which contains
#include ".\customheaders\windows.h"   //the customised header with the same name BUT in a subdirectory


and in your app
#include "windows.h"   //standard windows header
#include "MyHeader.h"  //and this will then find the duplicately named customised header
I had created such a wrapper. I will try it again as you suggested. In my case it is stddef.h which is included by the program as #include <linux/stddef.h>. So I made a linux directory and put a stddef.h there with #include <stddef.h>.
That worked. My mistake was that I had put the linux directory in my include search path.
But for future reference I'm still wondering if there is a way to tell Microsoft to search its include directories before my include directories.
order of includes - not that I know of to do what you wanted.