Function IsDestinationReachable
-
Can someone help me using function "IsDestinationReachable". When I try to build my application, I got folowing error message: OPFB error LNK2019: unresolved external symbol _IsDestinationReachableA@8 referenced in function "public: virtual int __thiscall MYPRGApp::InitInstance(void)" (?InitInstance@COPFBApp@@UAEHXZ) If someone have some code examle how to use this function, please send me. I include "Sensapi.h" and use library "Sensapi.lib". Thank yoou !
It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error. I was unable to find LNK2019. Is this a .NET project?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
Can someone help me using function "IsDestinationReachable". When I try to build my application, I got folowing error message: OPFB error LNK2019: unresolved external symbol _IsDestinationReachableA@8 referenced in function "public: virtual int __thiscall MYPRGApp::InitInstance(void)" (?InitInstance@COPFBApp@@UAEHXZ) If someone have some code examle how to use this function, please send me. I include "Sensapi.h" and use library "Sensapi.lib". Thank yoou !
According to the documentation[^], the import library for
IsDestinationReachable
issensapi.lib
. Have you perhaps changed configurations (e.g. from Debug to Release) and only included that library in the Link tab for one of them? -
It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error. I was unable to find LNK2019. Is this a .NET project?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
Can you show me how (few lines) including how to create some LPQOCINFO ? This is my source part that generate this error. if ( IsDestinationReachable("www.google.com", NULL) == TRUE) AfxMessageBox("Google ok !");
-
Can you show me how (few lines) including how to create some LPQOCINFO ? This is my source part that generate this error. if ( IsDestinationReachable("www.google.com", NULL) == TRUE) AfxMessageBox("Google ok !");
QOCINFO oci; oci.dwSize = sizeof(QOCINFO); IsDestinationReachable("www.google.com", &oci);
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
Can you show me how (few lines) including how to create some LPQOCINFO ? This is my source part that generate this error. if ( IsDestinationReachable("www.google.com", NULL) == TRUE) AfxMessageBox("Google ok !");
Still doesn't working...thank you for your effort, but please help me one more time .. I'm gona crazy wit this... This is part of my code. As you may see that I include Sensapi.h, and in properties of application I include library SensAPI.Lib (/IMPLIB:"SensAPI.Lib"). Do you have any earthly Idea what might be wrong with this ? #include "stdafx.h" #include "MYPRG.h" #include "MYPRGDlg.h" #include "Sensapi.h" #ifdef _DEBUG #define new DEBUG_NEW #endif ...... BOOL MYPRGApp::InitInstance() { ... QOCINFO oci; oci.dwSize = sizeof(QOCINFO); IsDestinationReachable("www.google.com", &oci); ....
-
It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error. I was unable to find LNK2019. Is this a .NET project?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
Interesting thing is that, if I omit the Sensapi.lib, I get the same error as I get it with included library ?!
-
Still doesn't working...thank you for your effort, but please help me one more time .. I'm gona crazy wit this... This is part of my code. As you may see that I include Sensapi.h, and in properties of application I include library SensAPI.Lib (/IMPLIB:"SensAPI.Lib"). Do you have any earthly Idea what might be wrong with this ? #include "stdafx.h" #include "MYPRG.h" #include "MYPRGDlg.h" #include "Sensapi.h" #ifdef _DEBUG #define new DEBUG_NEW #endif ...... BOOL MYPRGApp::InitInstance() { ... QOCINFO oci; oci.dwSize = sizeof(QOCINFO); IsDestinationReachable("www.google.com", &oci); ....
So you have "sensapi.lib" in the Object/library modules: box on the Link tab of the Project Settings dialog?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
So you have "sensapi.lib" in the Object/library modules: box on the Link tab of the Project Settings dialog?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
Yes, why ?
-
Yes, why ?
So where is the /IMPLIB operative being used?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
So where is the /IMPLIB operative being used?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
Sorry...misunderstanding From options you may see that /IMPLIB:"Sensapi.lib" is there. /OUT:"Debug/MYPRG.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/MYPRG.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Sensapi.lib" /MACHINE:IX86 I also try to include Sensapi.DLL file in this .cpp source, but still get same error. Do you think that I have to configure, or setup, or.... I don't know what else should I and where to... Should I put #include "Sensapi.h" directive on some particula place, should I include this library somwhere else except this (MYPROG Property Pages --> Configuration Properties --> Linker --> Advanced --> Import Library --> Sensapi.lib) ? I try to find some source code (or project file) that use this function on Internet, but it wasn't successfully. Do you have any other idea what might be wrong ?
-
Sorry...misunderstanding From options you may see that /IMPLIB:"Sensapi.lib" is there. /OUT:"Debug/MYPRG.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/MYPRG.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Sensapi.lib" /MACHINE:IX86 I also try to include Sensapi.DLL file in this .cpp source, but still get same error. Do you think that I have to configure, or setup, or.... I don't know what else should I and where to... Should I put #include "Sensapi.h" directive on some particula place, should I include this library somwhere else except this (MYPROG Property Pages --> Configuration Properties --> Linker --> Advanced --> Import Library --> Sensapi.lib) ? I try to find some source code (or project file) that use this function on Internet, but it wasn't successfully. Do you have any other idea what might be wrong ?
/IMPLIB
is for telling the linker to generate an import library with that name, based on the exports from your binary. To use an import library, you include it in the list of files to link. In the Visual Studio .NET IDE, this is found under Configuration Properties > Linker > Input > Additional Dependencies. If you've already been using/IMPLIB
, your output directory will likely contain a filesensapi.lib
, which could cause the linker to pick that file. If so, delete it. -
/IMPLIB
is for telling the linker to generate an import library with that name, based on the exports from your binary. To use an import library, you include it in the list of files to link. In the Visual Studio .NET IDE, this is found under Configuration Properties > Linker > Input > Additional Dependencies. If you've already been using/IMPLIB
, your output directory will likely contain a filesensapi.lib
, which could cause the linker to pick that file. If so, delete it.