Link to home
Start Free TrialLog in
Avatar of silverFox
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::cppvmConnection(void)" (??0cppvmConnection@@QAE@XZ)
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmConnection::~cppvmConnection(void)" (??1cppvmConnection@@UAE@XZ)
hello2.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cppvmSendStream::~cppvmSendStream(void)" (??1cppvmSendStream@@UAE@XZ)
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(char *)" (??0cppvmString@@QAE@PAD@Z)
hello2.obj : error LNK2001: unresolved external symbol "public: __thiscall cppvmSendStream::cppvmSendStream(class cppvmConnection &,enum cppvmSendConnection,int)" (??0cppvmSendStream@@QAE@AAVcppvmConnection@@W4cppvmSendConnection@@H@Z)
hello2.obj : error LNK2001: unresolved external symbol "public: void __thiscall cppvmObject::cppvmSend(class cppvmSendStream &)" (?cppvmSend@cppvmObject@@QAEXAAVcppvmSendStream@@@Z)
Debug/hello2.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
ASKER CERTIFIED SOLUTION
Avatar of Salte
Salte

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Madz
Madz

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.