undefined reference to `DhcpEnumSubnets'
I'm trying to get some information from the DHCP server using the windows api, but I keep getting undefined references.

According to MSDN DhcpEnumSubnets is in dhcpsapi.lib and I have verified that the prototype **IS** in the dhcpsapi.h file and (by simple text search) that it **IS** in the .lib

As you can see below I am linking against the lib, but still I get linker errors.
Does someone have any ideas for me ? 


Here is my compile log: I'm using Dev-C++ 4.9.9.2 on Windows XP SP2, with the latest Windows Platform SDK  
"Microsoft® Windows® Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5"  
"This release of the Windows SDK supports x86, x64, and IA64 platforms for building and running applications on Windows XP SP2, Windows Server 2003 R2, Windows Vista, and Windows Server 2008."

---
<i>
Compiler: Default compiler
Building Makefile: "C:\Projects\dhcptest\Makefile.win"
Executing  make clean
rm -f main.o  dhcptest.exe

g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/Program Files/Microsoft SDKs/Windows/v6.1/Include"   

g++.exe main.o  -o "dhcptest.exe" -L"C:/Dev-Cpp/lib" -L"C:/Program Files/Microsoft SDKs/Windows/v6.1/Lib" "../../Program Files/Microsoft SDKs/Windows/v6.1/Lib/WS2_32.Lib" "<b>../../Program Files/Microsoft SDKs/Windows/v6.1/Lib/dhcpsapi.lib</b>"  

<b>
main.o(.text+0x128):main.cpp: undefined reference to 'DhcpGetVersion'
main.o(.text+0x1d7):main.cpp: undefined reference to 'DhcpEnumSubnets'
main.o(.text+0x2b2):main.cpp: undefined reference to 'DhcpEnumSubnetClients'
</b>

collect2: ld returned 1 exit status

make.exe: *** [dhcptest.exe] Error 1

Execution terminated
</i>

undefined reference to `DhcpEnumSubnets'
===

I'm trying to get some information from the DHCP server using the windows api, but I keep getting undefined references.

According to MSDN DhcpEnumSubnets is in dhcpsapi.lib and I have verified that the prototype **IS** in the dhcpsapi.h file and (by simple text search) that it **IS** in the .lib

As you can see below I am linking against the lib, but still I get linker errors.
Does someone have any ideas for me ? 


Here is my compile log: I'm using Dev-C++ 4.9.9.2 on Windows XP SP2, with the latest Windows Platform SDK  
"Microsoft® Windows® Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5"  
"This release of the Windows SDK supports x86, x64, and IA64 platforms for building and running applications on Windows XP SP2, Windows Server 2003 R2, Windows Vista, and Windows Server 2008."

---
<i>
Compiler: Default compiler
Building Makefile: "C:\Projects\dhcptest\Makefile.win"
Executing  make clean
rm -f main.o  dhcptest.exe

g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/Program Files/Microsoft SDKs/Windows/v6.1/Include"   

g++.exe main.o  -o "dhcptest.exe" -L"C:/Dev-Cpp/lib" -L"C:/Program Files/Microsoft SDKs/Windows/v6.1/Lib" "../../Program Files/Microsoft SDKs/Windows/v6.1/Lib/WS2_32.Lib" "<b>../../Program Files/Microsoft SDKs/Windows/v6.1/Lib/dhcpsapi.lib</b>"  

<b>
main.o(.text+0x128):main.cpp: undefined reference to 'DhcpGetVersion'
main.o(.text+0x1d7):main.cpp: undefined reference to 'DhcpEnumSubnets'
main.o(.text+0x2b2):main.cpp: undefined reference to 'DhcpEnumSubnetClients'
</b>

collect2: ld returned 1 exit status

make.exe: *** [dhcptest.exe] Error 1

Execution terminated
</i>
