MyMAPIDlg.obj : error LNK2001: unresolved external symbol _MAPIReadMail@24
-
Everything compiles fine except this linker error...can anyone help to clear it?? I have all of the headers included. What am I doing wrong??? Thanks in advance, Dan
-
Everything compiles fine except this linker error...can anyone help to clear it?? I have all of the headers included. What am I doing wrong??? Thanks in advance, Dan
Add mapi32.lib to the list of import libs in your linker settings. --Mike-- http://home.inreach.com/mdunn/ Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
-
Add mapi32.lib to the list of import libs in your linker settings. --Mike-- http://home.inreach.com/mdunn/ Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
It is linked! Here is the error view: --------------------Configuration: MyMAPI - Win32 Debug-------------------- Compiling... MyMAPIDlg.cpp E:\Compaq\C++\ATest\MAPI\MyMAPI\MyMAPIDlg.cpp(182) : warning C4101: 'szTmp' : unreferenced local variable Linking... MyMAPIDlg.obj : error LNK2001: unresolved external symbol _MAPIReadMail@24 MyMAPIDlg.obj : error LNK2001: unresolved external symbol _MAPIFindNext@28 Debug/MyMAPI.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. MyMAPI.exe - 3 error(s), 1 warning(s) Thanks in advance, Dan
-
It is linked! Here is the error view: --------------------Configuration: MyMAPI - Win32 Debug-------------------- Compiling... MyMAPIDlg.cpp E:\Compaq\C++\ATest\MAPI\MyMAPI\MyMAPIDlg.cpp(182) : warning C4101: 'szTmp' : unreferenced local variable Linking... MyMAPIDlg.obj : error LNK2001: unresolved external symbol _MAPIReadMail@24 MyMAPIDlg.obj : error LNK2001: unresolved external symbol _MAPIFindNext@28 Debug/MyMAPI.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. MyMAPI.exe - 3 error(s), 1 warning(s) Thanks in advance, Dan
Huh, this is weird. I searched MSDN for "mapi lnk2001" and found Q188959, which says basically you don't link with an import lib. You instead have to load mapi32.dll and call
GetProcAddress()
on all MAPI functions you call. --Mike-- http://home.inreach.com/mdunn/ Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history? -
Huh, this is weird. I searched MSDN for "mapi lnk2001" and found Q188959, which says basically you don't link with an import lib. You instead have to load mapi32.dll and call
GetProcAddress()
on all MAPI functions you call. --Mike-- http://home.inreach.com/mdunn/ Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?Hi Micael, That was it! Thanks for the tip! Thanks in advance, Dan
-
Everything compiles fine except this linker error...can anyone help to clear it?? I have all of the headers included. What am I doing wrong??? Thanks in advance, Dan