I tried to compile the entire madwifi code using the 'make' command and it works. But what if I want to compile the madwifi code with my own main file? I wrote a very short program in which I create a struct ieee80211vap, which is defined in ieee80211_var.h. So in my code I put: #include ieee80211_var.h , thinking it would suffice but gcc gives me tons of errors. Anybody got an idea?