| 1122 | |
| 1123 | === I'm not able to build PJSIP with Visual Studio 2008 === #vs2008 |
| 1124 | |
| 1125 | Q: |
| 1126 | I'm continuing to build under vs2008, I download the directxSDK and puts its lib and include dir into the pjsip project But I having a strange error during the build, the Microsoft compiler is complaing about que Microsoft code). Let me show the code and the error: |
| 1127 | |
| 1128 | {{{ |
| 1129 | Code: |
| 1130 | ULONG |
| 1131 | WINAPI |
| 1132 | GetIpStatisticsEx( |
| 1133 | OUT PMIB_IPSTATS Statistics, |
| 1134 | IN ULONG Family |
| 1135 | ); |
| 1136 | |
| 1137 | Error: |
| 1138 | 1>e:\arquivos de programas\microsoft sdks\windows\v6.1\include\iphlpapi.h(390) : |
| 1139 | error C2146: syntax error : missing ')' before identifier 'Statistics' |
| 1140 | }}} |
| 1141 | |
| 1142 | A: Quoting Alan J. Bond's [http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-July/003667.html post on PJSIP mailing list]: |
| 1143 | |
| 1144 | Please check the version of Windows SDK you are using. Here are the details I previously posted about this problem: |
| 1145 | |
| 1146 | Windows SDK for Windows 2008 (6001.18000.367) has a typo in iphlpapi.h. The PJSIP project will not build with this SDK version unless iphlpapi.h is corrected. Nor will anything else using iphlpapi.h with _WIN32_WINNT defined as 0x4000 (for NT4 backward compatibility, not commonly used these days). It will throw up at this point in iphlpapi.h |
| 1147 | |
| 1148 | {{{ |
| 1149 | #if (NTDDI_VERSION >= NTDDI_XP) |
| 1150 | ULONG |
| 1151 | WINAPI |
| 1152 | GetIpStatisticsEx( |
| 1153 | OUT PMIB_IPSTATS Statistics, |
| 1154 | IN ULONG Family |
| 1155 | ); |
| 1156 | }}} |
| 1157 | ... complaining that PMIB_IPSTATS is undefined. This is because it erroneously enters this #if block because NTDDI_XP (which should be NTDDI_WINXP) is undefined. The NTDDI_xxx symbols are all defined in sdkddkver.h |
| 1158 | |
| 1159 | Please note that this is specific to this particular SDK version. Just find the above in iphlpapi.h and change NTDDI_XP to NTDDI_WINXP. |
| 1160 | |