I am a novice . i work in VC .NET 2003.
now!
i have added "D:\ice1.5.1for 7.0\include" into the directiories for include files
and added "D:\ice1.5.1for 7.0\lib" into the directiories for lib files.
but what i could do is compiling . i can't link the files.
the error messages :
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall IceUtil::NullHandleException::NullHandleException( char const *,int)" (__imp_??0NullHandleException@IceUtil@@QAE@PBDH@Z)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Ice::NoObjectFactoryException::~NoObjectFactoryExc eption(void)" (__imp_??1NoObjectFactoryException@Ice@@UAE@XZ)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Ice::Object::~Object(void)" (__imp_??1Object@Ice@@UAE@XZ)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Ice::OperationNotExistException::~OperationNotExis tException(void)" (__imp_??1OperationNotExistException@Ice@@UAE@XZ)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall IceDelegate::Ice::Object::~Object(void)" (__imp_??1Object@Ice@IceDelegate@@UAE@XZ)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl IceInternal::decRef(class Ice::Object *)" (__imp_?decRef@IceInternal@@YAXPAVObject@Ice@@@Z)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall IceUtil::GCShared::~GCShared(void)" (__imp_??1GCShared@IceUtil@@UAE@XZ)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl IceInternal::decRef(class Ice::ObjectAdapter *)" (__imp_?decRef@IceInternal@@YAXPAVObjectAdapter@Ic e@@@Z)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl IceInternal::decRef(class IceProxy::Ice::Object *)" (__imp_?decRef@IceInternal@@YAXPAVObject@Ice@IcePr oxy@@@Z)
icetest error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl IceInternal::incRef(class Ice::Object *)" (__imp_?incRef@IceInternal@@YAXPAVObject@Ice@@@Z)
icetest error LNK2001: unresolved external symbol "public: __thiscall Ice::LocalException::LocalException(class Ice::LocalException const &)" (??0LocalException@Ice@@QAE@ABV01@@Z)
icetest error LNK2001: unresolved external symbol "public: __thiscall Ice::MarshalException::MarshalException(class Ice::MarshalException const &)" (??0MarshalException@Ice@@QAE@ABV01@@Z)
icetest error LNK2001: unresolved external symbol "public: __thiscall Ice::NoObjectFactoryException::NoObjectFactoryExce ption(class Ice::NoObjectFactoryException const &)" (??0NoObjectFactoryException@Ice@@QAE@ABV01@@Z)
icetest error LNK2001: unresolved external symbol "public: __thiscall Ice::OperationNotExistException::OperationNotExist Exception(class Ice::OperationNotExistException const &)" (??0OperationNotExistException@Ice@@QAE@ABV01@@
~~~
the source files are copies from the instructions .
//////////////////////////////////////////////////////////////////////////////////////////////
//Printer.cpp
//////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
///server.cpp
///////////////////////////////////////////////////////////////////////////////////////////////
#include "Printer.h"
using namespace std;
class PrinterI : public Printer {
public:
virtual void printString(const string & s,const Ice::Current &);
};
void
PrinterI::
printString(const string & s, const Ice::Current &)
{
cout << s << endl;
}
int
main(int argc, char* argv[])
{
int status = 0;
Ice::CommunicatorPtr ic;
try {
ic = Ice::initialize(argc, argv);
Ice::ObjectAdapterPtr adapter
= ic->createObjectAdapterWithEndpoints(
"SimplePrinterAdapter", "default -p 10000");
Ice::ObjectPtr object = new PrinterI;
adapter->add(object,
Ice::stringToIdentity("SimplePrinter"));
adapter->activate();
ic->waitForShutdown();
} catch (const Ice::Exception & e) {
cerr << e << endl;
status = 1;
} catch (const char * msg) {
cerr << msg << endl;
status = 1;
}
if (ic)
ic->destroy();
return status;
}
//////////////////////////////////////////////////////////////////////////////////////////////
//Printer.h
//////////////////////////////////////////////////////////////////////////////////////////////
// Ice version 1.5.1
// Generated from file `Printer.ice'
#ifndef __Printer_h__
#define __Printer_h__
#include <Ice/LocalObjectF.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/Proxy.h>
#include <Ice/Object.h>
#include <Ice/Outgoing.h>
#include <Ice/Incoming.h>
#include <Ice/Direct.h>
#ifndef ICE_IGNORE_VERSION
# if ICE_INT_VERSION != 10501
# error Ice version mismatch!
# endif
#endif
namespace IceProxy
{
class Printer;
bool operator==(const Printer&, const Printer&);
bool operator!=(const Printer&, const Printer&);
bool operator<(const Printer&, const Printer&);
}
class Printer;
bool operator==(const Printer&, const Printer&);
bool operator!=(const Printer&, const Printer&);
bool operator<(const Printer&, const Printer&);
namespace IceInternal
{
void incRef(::Printer*);
void decRef(::Printer*);
void incRef(::IceProxy::Printer*);
void decRef(::IceProxy::Printer*);
}
typedef ::IceInternal::Handle< ::Printer> PrinterPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::Printer> PrinterPrx;
void __write(::IceInternal::BasicStream*, const PrinterPrx&);
void __read(::IceInternal::BasicStream*, PrinterPrx&);
void __write(::IceInternal::BasicStream*, const PrinterPtr&);
void __read(::IceInternal::BasicStream*, PrinterPtr&);
void __patch__PrinterPtr(void*, ::Ice::ObjectPtr&);
namespace IceProxy
{
class Printer : virtual public ::IceProxy::Ice::Object
{
public:
void printString(const ::std::string&);
void printString(const ::std::string&, const ::Ice::Context&);
static const ::std::string& ice_staticId();
private:
virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
};
}
namespace IceDelegate
{
class Printer : virtual public ::IceDelegate::Ice::Object
{
public:
virtual void printString(const ::std::string&, const ::Ice::Context&) = 0;
};
}
namespace IceDelegateM
{
class Printer : virtual public ::IceDelegate::Printer,
virtual public ::IceDelegateM::Ice::Object
{
public:
virtual void printString(const ::std::string&, const ::Ice::Context&);
};
}
namespace IceDelegateD
{
class Printer : virtual public ::IceDelegate::Printer,
virtual public ::IceDelegateD::Ice::Object
{
public:
virtual void printString(const ::std::string&, const ::Ice::Context&);
};
}
class Printer : virtual public ::Ice::Object
{
public:
static const ::std::string __ids[2];
virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
static const ::std::string& ice_staticId();
virtual void printString(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
::IceInternal:

ispatchStatus ___printString(::IceInternal::Incoming&, const ::Ice::Current&);
static ::std::string __all[5];
virtual ::IceInternal:

ispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);
virtual void __write(::IceInternal::BasicStream*) const;
virtual void __read(::IceInternal::BasicStream*, bool);
};
void __patch__PrinterPtr(void*, ::Ice::ObjectPtr&);
#endif