error C2065: 'inet_pton' : undeclared identifier - ipv6

This is a discussion on error C2065: 'inet_pton' : undeclared identifier - ipv6 within the Networking/Device Communication forums, part of the General Programming Boards category; Hi. I am using Visual C++ 6.0, Windows xp and Jrtplib(Rtp library). I have a code for ipv6 and It ...

  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    1

    Thumbs up error C2065: 'inet_pton' : undeclared identifier - ipv6

    Hi.
    I am using Visual C++ 6.0, Windows xp and Jrtplib(Rtp library).
    I have a code for ipv6 and It compile right in Linux, but It doesn't compile in windows.

    the error is:
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(63) : error C2065: 'inet_pton' : undeclared identifier
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(67) : error C2065: 'inet_ntop' : undeclared identifier
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(75) : error C2065: 'RTPUDPv6TransmissionParams' : undeclared identifier
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(75) : error C2146: syntax error : missing ';' before identifier 'transparamsv6'
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(75) : error C2065: 'transparamsv6' : undeclared identifier
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(79) : error C2228: left of '.SetPortbase' must have class/struct/union type
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(84) : error C2065: 'RTPIPv6Address' : undeclared identifier
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(84) : error C2146: syntax error : missing ';' before identifier 'addr_v6'
    f:\jrtplib_examples\example1_ipv6\ejemplo1_ipv6.cp p(84) : error C2065: 'addr_v6' : undeclared identifier
    Error executing cl.exe.
    Creating browse info file...

    Example1_ipv6.exe - 9 error(s), 52 warning(s)
    Somebody can help me?
    Attached Files Attached Files

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    On Windows it is called InetNtop, not inet_ntop, and it is only available on Vista or later. An alternative which is supported on earlier versions of windows is WSAAddressToString, which works all the way back to Win2k.

    For best portability, don't rely on these functions at all. Implement your own version.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,498
    a) you'll need an IPV6 library.
    b) VC6 is OVER 10 years old. Perhaps it's too old to understand about such things.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  3. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 09:23 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21