各位大侠:
小弟在VC++6.0中打开一个新的工程,选择创建一个Win32 Console程序,用了一下Netbios函数,代码如下:
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <nb30.h>
int main(int argc, char* argv[])
{
NCB ncb;
UCHAR uRetCode;
LANA_ENUM lana_enum;
memset( &ncb, 0, sizeof(ncb) );
ncb.ncb_command = NCBENUM;
ncb.ncb_buffer = (unsigned char *) &lana_enum;
ncb.ncb_length = sizeof(lana_enum);
uRetCode = Netbios( &ncb );
if ( uRetCode == 0 )
{
printf( "Ethernet Count is : %d\n\n", lana_enum.length);
}
return 0;
}
编译能通过,但总报连接错:
Cpp1.obj : error LNK2001: unresolved external symbol _Netbios@4
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
请各位老大帮帮忙,谢谢!!!
[求助]vc++6.0中Netbios编程的连接错!