几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】error lnk2001 aoubt dwf impor (http://www.dimcax.com/hust/showthread.php?t=16098)

yang686526 2009-05-05 09:41 AM

【转帖】error lnk2001 aoubt dwf impor
 
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::odvariant(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!


所有的时间均为北京时间。 现在的时间是 04:02 AM.