Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Error 42: Symbol Undefined _URLDownloadToCacheFileA 24
I'm getting this error in a program, on linking: Error 42: Symbol Undefined _URLDownloadToCacheFileA 24 The program #include's <urlmon.h>, and urlmon.lib is included in the compile line. I generated urlmon.lib from urlmon.dll with implib ("Digital Mars Import Library Manager Version 7.5B4n"). Compile line: dmc.exe -oSyncStarmap.exe c:\dm\lib\urlmon.lib -D -g -DWINDOWS -DMULTI SyncSm.cpp genalg.cpp randalg.cpp SyncSm.def -mn -5 | more Paths etc: set path=c:\dm\bin;c:\windows\system32;c:\windows;c:\windows\command set lib=c:\dm\lib set include=c:\dm\include What I see when I attempt to compile it: Compiling SyncStarmap... SyncSm.cpp: genalg.cpp: randalg.cpp: link SyncSm+genalg+randalg,SyncStarmap.exe,,c:\dm\lib\urlmon+user32+kernel32,Syn cSm/co/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved SyncSm.obj(SyncSm) Error 42: Symbol Undefined _URLDownloadToCacheFileA 24 --- errorlevel 1 SyncSm.cpp is calling URLDownloadToCacheFile like so: int hresult = URLDownloadToCacheFile(NULL, "http://there-was-a-url-here-but-I've-removed-it", path, sizeof(path), 0, &downloadCallback); Since it's compiling right, it must be a problem with the lib, right? The function names inside the lib don't look mangled at all (It's just "URLDownloadToCacheFileA", so ... c:\dm\include\win32\urlmon.h has this definition for URLDownloadToCacheFileA: STDAPI URLDownloadToCacheFileA(LPUNKNOWN,LPCSTR,LPTSTR,DWORD,DWORD,LP INDSTATUSCALLBACK); How can I make this work? What's wrong with it? I've attempted remaking the lib: Originally I had done just implib urlmon.lib urlmon.dll (I copied urlmon.dll into the c:\dm\bin folder, and after running implib, copied the generated urlmon.lib into c:\dm\lib) The lib made by implib /system urlmon.lib urlmon.dll resulted in the same link-time error. And this did too: implib /system /v /suffix urlmon.lib urlmon.dll This one didn't work, I got a "Could not start SPPN.EXE!" error: implib /system /v /suffix /Ic:\dm\include\win32 urlmon.lib urlmon.dll Mar 18 2005
"SL" <shadowlord13 gmail.com> wrote in message news:d1f39h$1eor$1 digitaldaemon.com...I'm getting this error in a program, on linking: Error 42: Symbol Undefined _URLDownloadToCacheFileA 24 The program #include's <urlmon.h>, and urlmon.lib is included in the compile line. I generated urlmon.lib from urlmon.dll with implib ("Digital Mars Import Library Manager Version 7.5B4n"). Mar 18 2005
Walter wrote:"SL" <shadowlord13 gmail.com> wrote in message news:d1f39h$1eor$1 digitaldaemon.com...I'm getting this error in a program, on linking: Error 42: Symbol Undefined _URLDownloadToCacheFileA 24 The program #include's <urlmon.h>, and urlmon.lib is included in the compile line. I generated urlmon.lib from urlmon.dll with implib ("Digital Mars Import Library Manager Version 7.5B4n"). Mar 18 2005
Ok, 'lib -l urlmon.lib' is erroring with 'Corrupt file 'urlmon.lib', Typ=xf1, Len=xcd1e' Hmm. So implib didn't do its job right? If I do 'implib urlmon.lib urlmon.dll', and then run 'lib -l urlmon.lib' I get the same error, ecept Len is xcd17 instead of xcd1e. Mar 18 2005
"SL" <shadowlord13 gmail.com> wrote in message news:d1fegt$23ic$1 digitaldaemon.com...Ok, 'lib -l urlmon.lib' is erroring with 'Corrupt file 'urlmon.lib', Typ=xf1, Len=xcd1e' Hmm. So implib didn't do its job right? Mar 18 2005
Or something else is happening. implib has been in the field for over a decade, it works fine. Mar 18 2005
"SL" <shadowlord13 gmail.com> wrote in message news:d1frg2$2hl9$1 digitaldaemon.com...Or something else is happening. implib has been in the field for over a decade, it works fine. Mar 18 2005
Walter wrote:Now we're getting somewhere. Check out www.digitalmars.com/faq.html#sysimport Mar 18 2005
SL wrote: > (P.S. I noticed that Microsoft's link.exe no longer has a /convertoption (at least in the link.exe in "Microsoft Visual C++ Toolkit 2003", which is supposed to be the same as the one in VS.NET 2003) - I'm mentioning this because http://www.digitalmars.com/ctg/coff2omf.html suggests running link /lib /convert file.lib to make the lib usable by coff2omf)) Mar 24 2005
|