c++ - Unresolved external symbol _IID / _CLSID -
i created default atl project msvc 2010 simple default atl dialog. added second project solution, named mycontrols, created atl dhtml control of wizard. placed atl dhtml control atl dialog.
now call methods of atl dhtml control in atl dialog's oninitdialog
function. in order able make call like:
ccomptr<idhtmlcontrol> ptr; hresult hr = getdlgcontrol(idc_activex_control_dhtml , iid_idhtmlcontrol, (void**)&ptr);
i including file dhtmlcontrol.h mycontrols project. however, following errors:
- error 1 error lnk2001: unresolved external symbol _iid_idhtmlcontrol
- error 2 error lnk2001: unresolved external symbol _libid_mycontrolslib
- error 3 error lnk2001: unresolved external symbol _clsid_dhtmlcontrol
- error 4 error lnk2001: unresolved external symbol _iid_idhtmlcontrolui
note: appears linking mycontrols.lib incorrectly, however, added mycontrols.lib linker->input->additonal dependencies & specified ../$(configuration) in linker->general->additional library directories.
anyone have idea? thanks!
the problem related how link 1 project other. there missing here , since don't show code, it's pure guess only.
on control project have type library which, when being built, generates files mycontrols_i.h
, mycontrols_i.c
, mycontrols_p.c
. suppose on application project included _i.h
file declared symbols externals, , did not include _i.c
file symbols defined.
Comments
Post a Comment