help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gethostname, `FindAtomA' could not be found


From: Ico
Subject: Re: Gethostname, `FindAtomA' could not be found
Date: 25 May 2006 08:04:37 GMT
User-agent: tin/1.7.8-20050315 ("Scalpay") (UNIX) (Linux/2.6.13 (i686))

In comp.lang.c Cottonwood <google@c-d-j.de> wrote:
> I have a problem to retrieve th hostname of my pc.
> I'm using Windows XP SP2 with the last updates and GNU Dev C++ 4.9.9.2.
> Here my little test program:
> 
> #include <winsock2.h>
> #include <unistd.h>
> int main(void) {
>   char host_name[255] = {0};
>   int  ccode;
>   if (( ccode = gethostname( host_name, sizeof( host_name))) != 0) {
>      printf( "gethostname failed, ccode = %d\n", ccode);
>      return EXIT_FAILURE;
>   }
>   printf( "host name: %s\n", host_name);
>   return EXIT_SUCCESS;
> 
> }
> 
> Used Libraries:
> "../../Compiler lcc-win32/lcc/lib/ws2_32.lib"
> "../../Compiler lcc-win32/lcc/lib/kernel32.lib"
> "../../Compiler lcc-win32/lcc/lib/user32.lib"
> 
> Linking makes no problems. But when executing I get the message
> the entry point `FindAtomA' could not be found in the dll `WS2_32.DLL'.
> 
> 
> What am I doing wrongn?

You are asking the question in the wrong newsgroup. Your problem seems
to be 100% windows related, and clc only discusses ANSI-C. Please go to
the proper comp.windows.* group and ask again.


Thank you.
 

-- 
:wq
^X^Cy^K^X^C^C^C^C


reply via email to

[Prev in Thread] Current Thread [Next in Thread]