几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】help please - link errors (http://www.dimcax.com/hust/showthread.php?t=16516)

yang686526 2009-05-05 12:06 PM

【转帖】help please - link errors
 
help please - link errors
help please - link errors
hello,
i'm trying to build a very simple console application using dwgdirect libraries in vs2003 envirnoment. i'm able to compile the code succesfully but i get the following linker errors when i try to build it. i have been beating my head for couple of days to figure out the issue but i'm not making any progress. any help will be much appreciated.
thanks
please find below the code, project settings and linker errors:
-------------------------
// this is the main project file for vc++ application project
// generated using an application wizard.
#include "stdafx.h"
#include <malloc.h>
#include "odacommon.h"
#include "dbdatabase.h"
#include "dbentity.h"
#include "dbdimassoc.h"
#include "odcharmapper.h"
#include "exsystemservices.h"
#include "exhostappservices.h"
#include "exprotocolextension.h"
#include "odfilebuf.h"
#include "dbblocktable.h"
#include "dbsymboltable.h"
#include "dbblocktablerecord.h"
#include "dbobjectiterator.h"
#include "idarrays.h"
#include "dbblockreference.h"
#include "staticrxobject.h"
#include "caddebugger.h"
#include "tostring.h"
class myservices : public exsystemservices, public exhostappservices
{
protected:
odrx_using_heap_operators(exsystemservices);
};
int main()
{
//adding this one line gives me all the linker errors
odstaticrxobject<myservices> svcs;
}
//end of cpp file
-------------------------------------------------------------------
project compile settings:
----------------------------
/od /i "c:\applications\readdwg\dd_nonlibs\include" /i "c:\applications\readdwg\dd_nonlibs\extensions\exs ervices" /i "c:\labs\readdwg\dd_nonlibs\common" /d "win32" /d "_debug" /d "_console" /d "_mbcs" /fd /ehsc /rtc1 /mdd /gs /fp"c:\labs\caddebugger\caddebugger\debug\caddebugg er.pch" /fo"debug/" /fd"debug/vc70.pdb" /fr"debug/" /w3 /nologo /c /zi
--------------------------------------------------------------------------
linker settings:
--------------
/out:"c:\labs\caddebugger\caddebugger\debug\caddebu gger.exe" /incremental /nologo /libpath:"c:\applications\readdwg\dd_nonlibs\lib\vc 2003mdd" /libpath:"c:\applications\readdwg\dd_vc2003\lib\vc2 003md" /debug /pdb:"c:\labs\caddebugger\caddebugger\debug/caddebugger.pdb" /subsystem:console dd_vc2003md_br.lib dd_vc2003md_alloc.lib dd_vc2003md_gi.lib dd_vc2003md_acisrenderer.lib dd_vc2003md_acisbuilder.lib dd_vc2003md_modelergeometry.lib dd_vc2003md_db.lib dd_vc2003md_ge.lib dd_vc2003md_gs.lib dd_vc2003md_root.lib dd_vc2003md_spatialindex.lib dd_vc2003md_ave.lib dd_vc2003md_recomputedimblock.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
--------------------------------------------------------------------------
also i have attached exhostappservices.h and exprotocolextension.h and their corresponding .cpp files to the project.
--------------------------------------------------------------------------
linker errors:
---------------
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual enum odcodepageid __thiscall exsystemservices::systemcodepage(void)const " (?systemcodepage@exsystemservices@@ube?aw4odcodepa geid@@xz)
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual class odstring __thiscall exsystemservices::formatmessage(unsigned int,char * *)" (?formatmessage@exsystemservices@@uae?avodstring@@ ipapad@z)
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual __int64 __thiscall exsystemservices::getfilesize(class odstring const &)" (?getfilesize@exsystemservices@@uae_jabvodstring@@ @z)
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual __int64 __thiscall exsystemservices::getfilemtime(class odstring const &)" (?getfilemtime@exsystemservices@@uae_jabvodstring@ @@z)
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual __int64 __thiscall exsystemservices::getfilectime(class odstring const &)" (?getfilectime@exsystemservices@@uae_jabvodstring@ @@z)
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual bool __thiscall exsystemservices::accessfile(class odstring const &,int)" (?accessfile@exsystemservices@@uae_nabvodstring@@h @z)
caddebugger.obj : error lnk2001: unresolved external symbol "public: virtual class odsmartptr<class odstreambuf> __thiscall exsystemservices::createfile(class odstring const &,enum oda::fileaccessmode,enum oda::filesharemode,enum oda::filecreationdisposition)" (?createfile@exsystemservices@@uae?av?$odsmartptr@ vodstreambuf@@@@abvodstring@@w4fileaccessmode@oda@ @w4filesharemode@5@w4filecreationdisposition@5@@z)
caddebugger.obj : error lnk2019: unresolved external symbol "public: __thiscall exsystemservices::exsystemservices(void)" (??0exsystemservices@@qae@xz) referenced in function "public: __thiscall myservices::myservices(void)" (??0myservices@@qae@xz)
c:\labs\caddebugger\caddebugger\debug\caddebugger. exe : fatal error lnk1120: 8 unresolved externals
------------------------------------------------------------------------
you need to include exsystemservices.cpp into your project.
sergey slezkin
thank you so much. it worked
--krish


所有的时间均为北京时间。 现在的时间是 10:52 PM.