silverFox
asked on
link error
Below is my program and I am getting linking errors. They are listed below as well.
I know that it is something small and overlooked but please help me out. Thank you.
#include "cppvm.h"
int main()
{
// connect to pvm
cppvmConnection pvmConn;
// send descriptor
// (blocking send
// to parent process)
cppvmSendStream sendStrm(pvmConn,
CPPvmSBparent);
// message
cppvmString sendMsg("hello world!");
// send message
sendStrm << sendMsg;
return 0;
}
Linking...
LINK : warning LNK4044: unrecognized option "nodefaultlibrary:libcd"; ignored
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmConnection::cppvmConn ection(voi d)" (??0cppvmConnection@@QAE@X Z)
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmConnection::~cppvmCon nection(vo id)" (??1cppvmConnection@@UAE@X Z)
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmSendStream::~cppvmSen dStream(vo id)" (??1cppvmSendStream@@UAE@X Z)
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmString::~cppvmString( void)" (??1cppvmString@@UAE@XZ)
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmString::cppvmString(c har *)" (??0cppvmString@@QAE@PAD@Z )
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmSendStream::cppvmSend Stream(cla ss cppvmConnection &,enum cppvmSendConnection,int)" (??0cppvmSendStream@@QAE@A AVcppvmCon nection@@W 4cppvmSend Connection @@H@Z)
hello2.obj : error LNK2001: unresolved external symbol "public: void __thiscall cppvmObject::cppvmSend(cla ss cppvmSendStream &)" (?cppvmSend@cppvmObject@@Q AEXAAVcppv mSendStrea m@@@Z)
Debug/hello2.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
I know that it is something small and overlooked but please help me out. Thank you.
#include "cppvm.h"
int main()
{
// connect to pvm
cppvmConnection pvmConn;
// send descriptor
// (blocking send
// to parent process)
cppvmSendStream sendStrm(pvmConn,
CPPvmSBparent);
// message
cppvmString sendMsg("hello world!");
// send message
sendStrm << sendMsg;
return 0;
}
Linking...
LINK : warning LNK4044: unrecognized option "nodefaultlibrary:libcd"; ignored
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmConnection::cppvmConn
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmConnection::~cppvmCon
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmSendStream::~cppvmSen
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmString::~cppvmString(
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmString::cppvmString(c
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmSendStream::cppvmSend
hello2.obj : error LNK2001: unresolved external symbol "public: void __thiscall cppvmObject::cppvmSend(cla
Debug/hello2.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Assuming cppvm.cpp is the file that contains the definition of the functions that you are calling, add either the lib in which cppvm.cpp is included(if one exists) or add cppvm.cpp directly into your project. Both ways the linker would find the function definitions.