After adding a new source file or library to an XLL+ project and saving the project, the following linker error occurs:
In particular, this can occur in a project which previously linked perfectly.LNK2005: symbol multiply defined
In the Link tab of the Project Settings dialog, select the Input category, and check the field Ignore all default libraries, as shown below. Note that you will need to do this for both builds, Debug and Release.
In the Object/library modules field add the required libraries at the beginning (i.e. left-hand side) of the list. The required libraries are as follows. Ensure that you select the correct libraries for the builds you are using.
Build | Libraries |
---|---|
MFC Debug | xlllibd.lib mfc42d.lib mfcs42d.lib msvcrtd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib advapi32.lib shell32.lib comctl32.lib uuid.lib mfco42d.lib oledlg.lib ole32.lib olepro32.lib oleaut32.lib urlmon.lib mfcd42d.lib msvcprtd.lib oldnames.lib version.lib |
MFC Release | xlllibr.lib mfc42.lib mfcs42.lib msvcrt.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib advapi32.lib shell32.lib comctl32.lib uuid.lib oledlg.lib ole32.lib olepro32.lib oleaut32.lib urlmon.lib msvcprt.lib oldnames.lib version.lib |
STL Debug | xlllibsd.lib uuid.lib libcpmtd.lib libcmtd.lib oldnames.lib kernel32.lib version.lib |
STL Release | xlllibsr.lib uuid.lib libcpmt.lib libcmt.lib oldnames.lib kernel32.lib version.lib |