Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

/usr/ccs/bin/ld: Unsatisfied symbols:

Highlighted
Occasional Visitor

/usr/ccs/bin/ld: Unsatisfied symbols:

Hi I am building a client which uses HP WBEM Services to get data from server and feeds the data as knowledge in a rule engine called as CLIPS (currently I am just printing a statement from CLIPS).

**********************************************

Following is the code:


#include
#include

#include
#include "setup.h"
#include "sysdep.h"
#include "extnfunc.h"
#include "commline.h"
#include
//using namespace std;

#include "clips.h"

//#if ANSI_COMPILER
//int main(int,char *[]);
//VOID UserFunctions(void);
//#else
//int main();
VOID UserFunctions();
//#endif



PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;

int main(int argc, char** argv)
{
const CIMNamespaceName NAMESPACE =
CIMNamespaceName("SDKExamples/DefaultCXX");
const CIMName CLASSNAME = CIMName("Sample_InstanceProviderClass");

try
{
Boolean deepInheritance = true;
Boolean localOnly = true;
Boolean includeQualifiers = false;
Boolean includeClassOrigin = false;
Array cimInstances;
CIMClient client;

//
// The connectLocal Client API creates a connection to the server for
// local clients. The connection is automatically authenticated
// for the current user. The connect Client API, can be used to create
// an HTTP connection with the server defined by the URL in address.
// User name and Password information can be passed
// using the connect Client API.
//
client.connectLocal();

//
// Enumerate Instances.
//
cimInstances = client.enumerateInstances(
NAMESPACE,
CLASSNAME,
deepInheritance,
localOnly,
includeQualifiers,
includeClassOrigin);

cout << "Total Number of Instances: " << cimInstances.size() << endl;
cout << "hello" << endl;


InitializeEnvironment();
Load("kb.clp");
Reset();
Run(-1L);

}
catch (Exception& e)
{
cerr << "Error: " << e.getMessage() << endl;
exit(1);
}



return 0;
}

VOID UserFunctions()
{
}


*********************************************
Following is the Error:

But I am getting following error:


bash-2.04# ./wb2.sh .
/usr/ccs/bin/ld: Unsatisfied symbols:
Load(char *) (first referenced in EnumInstances.o) (code)
Run(long) (first referenced in EnumInstances.o) (code)
UserFunctions (first referenced in sysdep.o) (code)
Reset() (first referenced in EnumInstances.o) (code)
InitializeEnvironment() (first referenced in EnumInstances.o) (code)
sysdep.o: Load is CODE UNSAT
filecom.o: Load is CODE UNSAT
cstrcpsr.o: Load is ENTRY UNIVERSAL

*********************************************
1 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: /usr/ccs/bin/ld: Unsatisfied symbols:

>Load(char*)
>Run(long)
>UserFunctions
>Reset()
>InitializeEnvironment()

Where are these functions suppose to be defined? Should all these be extern "C"?

>cstrcpsr.o: Load is ENTRY UNIVERSAL

This is defined extern "C".

>VOID UserFunctions() {}

Perhaps this also should be extern "C" to match sysdep.o?