Windows下使用VS2008編譯時經(jīng)常遇到macro redefinition警告或錯誤,如:
c:\programme\microsoft sdks\windows\v6.0a\include\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition
解決方法:打開編譯選項 /showIncludes
Use the compiler option /showIncludes to find out how they are getting included.
看程序直接或者間接Include了哪些頭文件,通過調(diào)整頭文件順序等辦法解決。