Hello,
I am a newbie and I ran in to the following problem using dev-c++ while
trying to create a util for Win32. Amongst other things it should create a
drive mapping.
I used the the following code:
#include <stdio.h>
#include <windows.h>
#include <winnetwk.h>
int main(int argc, char *argv[])
{
WNetAddConnection("\\\\server\\c$", "", "Q:");
WNetAddConnection("\\\\server\\d$", "", "R:");
return 0;
}
But when I try to compile it I get the following linker error:"
e:\src\mappings\main.o(.text+0x6a):main.cpp: undefined reference to
`WNetAddConnectionA@12'
e:\src\mappings\main.o(.text+0x84):main.cpp: undefined reference to
`WNetAddConnectionA@12'
I checked for the winnetwk.h file and it is there. But there is no mpr.lib
After that I tried to use the mpr.lib from Microsofts VC and set the
library location in the compileroptions to it but that did not create a
different output at all...
I don't know what to do anymore. Can anyone help me?
grtz
Joost van Rooij
|