![]() |
【转帖】mfc in a static library odamfcapp.exe
mfc in a static library & odamfcapp.exe
mfc in a static library & odamfcapp.exe i build odamfcapp.exe with: "use of mfc" option set to "use mfc in a static library" but when i check dll dependencies (tdump) there are still dependencies to mfc71.dll. how to build odamfcapp with static linking to mfc71.dll? what libraries and what compiler do you use? make sure that linker options does not contain references to mfc71 what functions are imported from mfc? (you may use ms "depends" tool to see that) vladimir i use visual studio 2003 and original .vcproj files from 13.02 (no changes) in attachemnt i put the result of "tdump odamfcapp.exe" my libraries: excustobjs.lib dd_vc2003md_rxrasterservices.lib gs_winopengl.lib gs_wingdi.lib dd_vc2003md_br.lib dd_vc2003md_acisrenderer.lib dd_vc2003md_acisbuilder.lib dd_vc2003md_modelergeometry.lib windirectx.lib dd_vc2003md_dbcommands.lib dd_vc2003md_alloc.lib dd_vc2003md_svgexport.lib dd_vc2003md_dwfimport.lib dd_vc2003md_gi.lib glu32.lib dd_vc2003md_jpeg.lib dd_vc2003md_db.lib dd_vc2003md_ge.lib dd_vc2003md_gs.lib dd_vc2003md_root.lib opengl32.lib dd_vc2003md_dwftoolkit.lib dd_vc2003md_dwfexport.lib dd_vc2003md_zlib.lib dd_vc2003md_zip.lib grippoints.lib dd_vc2003md_spatialindex.lib dd_vc2003md_bmpexport.lib odbagfiler.lib dd_vc2003md_rxplotstyleservices.lib oleitemhandler.lib and dirs for libs: ../../../../../lib/vc2003md,,../../../../../thirdparty/lib/win32/msvc6/dll/vc6md all above are original settings. attached files (89.8 kb, 7 views) you cannot use md libraries with static mfc. (see e.g. ) if you will switch to mt libraries look at relevant dd faq topic: dd_faq.html#operatornewdefined vladimir i switch libs to mt, remove dd_xxxxx_alloc.lib from proj, add some extern "c" { ...} as in faq but still have a problem with linking during compilation. can you send me the correct odamfcapp.vcproj file? did you remove _afxdll symbol from preprocessor definitions? what linker errors do you have? (i have no project file for mt config) vladimir thanks a lot. you were right! i forgot to remove _afxdll and add /force:multiple to linker options. i've attached my odamfcapp.vcproj best regards, mk attached files (3.1 kb, 20 views) |
所有的时间均为北京时间。 现在的时间是 03:48 PM. |