CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    Problem in Linking!

    Hi all,

    Iam using IcmpParseReplies() Api, but iam getting
    error LNK2001: unresolved external symbol _IcmpParseReplies

    But i had already included the IcmpAPI.h header file and icmp.lib, Iphlpapi.lib files linked in SETTINGS-> LINK.

    Iam also using IcmpSendEcho2() Api in the same code.
    Iam not getting unresolved error while using IcmpSendEcho2().

    How to solve this problem?

    With Regards,
    A.Ilamparithi.
    Last edited by ilamparithi; June 8th, 2004 at 09:34 AM.

  2. #2
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    This function is only available in Windows 2000 or higher...thus, it might be covered with an '#ifdef...#endif' guard...

    Thus, you need to set the WINVER macro accordingly...
    Code:
    #define WINVER 0x0500

  3. #3
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    re:

    Originally posted by Andreas Masur
    This function is only available in Windows 2000 or higher...thus, it might be covered with an '#ifdef...#endif' guard...

    Thus, you need to set the WINVER macro accordingly...
    Code:
    #define WINVER 0x0500
    Hi Andreas,

    Iam working in a Windows 2000 Professional machine only.

    Anyway i tried to set WINVER macro, still the error remains the same.

    With Thanks,
    A.Ilamparithi.

  4. #4
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Well...I did not check it, thus, it might be the other macro instead...
    Code:
    #define _WIN32_WINNT 0x0500

  5. #5
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    re:

    Originally posted by Andreas Masur
    Well...I did not check it, thus, it might be the other macro instead...
    Code:
    #define _WIN32_WINNT 0x0500
    Hi Andreas,

    Still the same linking error occurs.

    With Thanks,
    A.Ilamparithi.

  6. #6
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Well...then I am running out of ideas at the moment...I do not have the header available, thus, cannot look for the function...sorry about that....

  7. #7
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    RE:

    Originally posted by Andreas Masur
    Well...then I am running out of ideas at the moment...I do not have the header available, thus, cannot look for the function...sorry about that....
    No probs!

    Thanks Andreas!

    Anyone know the solution??????

    A.Ilamparithi.

  8. #8
    Join Date
    Aug 2001
    Location
    Germany
    Posts
    1,384
    Originally posted by Andreas Masur
    Well...I did not check it, thus, it might be the other macro instead...
    Code:
    #define _WIN32_WINNT 0x0500
    Well thats a linker error, and #ifdef are resolved at compile time. So defining WIN_VER wont matter. May be u need to upgrade your SDK. Its a failrly recent API supported on Win2K and above.
    Regards,
    Usman.

  9. #9
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Ohhh....one more thing that comes to my mind...make sure that you have the latest files...in other words...does the function exists in your header file?

  10. #10
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    re:

    Originally posted by usman999_1
    Well thats a linker error, and #ifdef are resolved at compile time. So defining WIN_VER wont matter. May be u need to upgrade your SDK. Its a failrly recent API supported on Win2K and above.
    Regards,
    Usman.
    Hi Usman,

    Iam using Microsoft Platform Software Development Kit (SDK) April 2000 Edition and my system is Windows 2000 Professional 5.00.2195 with service pack 4.

    Should i upgrade SDK??

    With Thanks,
    A.Ilamparithi.

  11. #11
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    re:

    Originally posted by Andreas Masur
    Ohhh....one more thing that comes to my mind...make sure that you have the latest files...in other words...does the function exists in your header file?
    Hi Andreas,

    I had already checked that.

    That function is in the header file.

    With Thanks,
    A.Ilamparithi.

  12. #12
    Join Date
    Aug 2001
    Location
    Germany
    Posts
    1,384

    Re: re:

    Originally posted by ilamparithi
    Hi Usman,

    Iam using Microsoft Platform Software Development Kit (SDK) April 2000 Edition and my system is Windows 2000 Professional 5.00.2195 with service pack 4.

    Should i upgrade SDK??

    With Thanks,
    A.Ilamparithi.
    I am not sure about the SDK version problem, But still April 2000 ver is more then 4 yrs old. I would say if possible try upgrading to a newer version first.
    Regards,
    Usman.

  13. #13
    Join Date
    Nov 2003
    Location
    Bangalore
    Posts
    78

    Re: Re: re:

    Originally posted by usman999_1
    I am not sure about the SDK version problem, But still April 2000 ver is more then 4 yrs old. I would say if possible try upgrading to a newer version first.
    Regards,
    Usman.
    Hi Usman,

    If that is the case, then the header file itself should not have the function definition know??

    But, that is not the case here. In the header file, the function definition is there.

    With Thanks,
    A.Ilamparithi.

  14. #14
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Originally posted by usman999_1
    Well thats a linker error, and #ifdef are resolved at compile time. So defining WIN_VER wont matter.
    Well...you are right about the technical aspect....however, many functions (usually functions not available for all Windows operating systems) are covered by such a guard to prevent using these functions on systems which do not support these...and in this case 'WINVER' etc. does matter pretty much...

  15. #15
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: Re: Re: re:

    Originally posted by ilamparithi
    In the header file, the function definition is there.
    Then check whether the function is exported through the lib file...using the dependency walker for example...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured