error lnk2001 aoubt dwf import
error lnk2001 aoubt dwf import
code as follows:
#include "odacommon.h"
#include "dbdatabase.h"
#include "rxobjectimpl.h"
#include "exsystemservices.h"
#include "exhostappservices.h"
#include "odfilebuf.h"
#include "rxvariantvalue.h"
#include "dwfimport.h"
class myservices : public exsystemservices, public exhostappservices
{
odrx_using_heap_operators(exsystemservices);
};
int main(int argc, char* argv[])
{
odstaticrxobject<myservices> svcs;
odinitialize(&svcs);
oddwfimportptr importer = createimporter();
oddbdatabaseptr pdb = svcs.createdatabase();
importer->properties()->putat( "database", pdb );
importer->properties()->putat( "dwfpath", odrxvariantvalue( odstring(argv[1]) ) );
importer->import();
importer = 0;
odwrfilebuf fb(argv[2]);
pdb->writefile(&fb, oddb::kdwg, oddb::kdhl_current);
pdb = 0;
oduninitialize();
return 0;
}
compile results:
linking...
dwf.obj : error lnk2001: unresolved external symbol "void __cdecl oduninitialize(void)" (?oduninitialize@@yaxxz)
dwf.obj : error lnk2001: unresolved external symbol "public: void __thiscall oddbdatabase::writefile(class odstreambuf *,enum oddb::savetype,enum oddb:wgversion,bool,int)" (?writefile@oddbdatabase@@qaexpavodstreambuf@@w4sa vetype@oddb@@w4dwgversion
@4@_nh@z)
.................................................. ...........................
setstring@odvariant@@qaeaav1@abvodstring@@@z)
dwf.obj : error lnk2001: unresolved external symbol "public: __thiscall odvariant:

dvariant(void)" (??0odvariant@@qae@xz)
dwf.obj : error lnk2001: unresolved external symbol "public: __thiscall odvariant::~odvariant(void)" (??1odvariant@@qae@xz)
debug/dwf.exe : fatal error lnk1120: 177 unresolved externals
error executing link.exe.
dwf.exe - 178 error(s), 0 warning(s)
windowsxp + vc6.0
please give me a hand!
open the project
projectfiles\win32\msvc6\examples\oddwfimportex\od dwfimportex.dsp
and compare libraries list with your project.
are you using dll or lib version?
vladimir
thank you! it work now!