Title: Win32 build error on 12/31 CVS Post by: OldShofixti on January 01, 2003, 01:06:18 am Hi all,
I encountered the following build error using MSVC++ on Win32 to build today's CVS (12/31): Quote Linking... dirs.obj : error LNK2001: unresolved external symbol _SHGetFolderPathA@20 ../../uqm.exe : fatal error LNK1120: 1 unresolved externals I did some research on the SHGetFolderPath function and it turns out to be Windows 2000-specific (and probably exists on XP as well). However, the older Win32 platforms supply this function in SHFolder.DLL in the system folder. I couldn't find the corresponding LIB file for this DLL so I wasn't able to build this version of UQM. Thanks, --OldShofixti Title: Re: Win32 build error on 12/31 CVS Post by: serendipity on January 01, 2003, 04:59:42 am Quote Hi all, I did some research on the SHGetFolderPath function and it turns out to be Windows 2000-specific (and probably exists on XP as well). However, the older Win32 platforms supply this function in SHFolder.DLL in the system folder. I couldn't find the corresponding LIB file for this DLL so I wasn't able to build this version of UQM. Thanks, --OldShofixti I'm compiling on Windows XP, and getting the error as well. Any luck figuring out a workaround? Title: Re: Win32 build error on 12/31 CVS Post by: Mika on January 01, 2003, 05:08:53 am I assume you both are using VC6? With VC7 it works fine. Does VC6 include ShFolder.lib at all? If yes, try adding it to libs (with VC7 it's enough to link against shell32.lib).
We'll investigate this more later with meep-eep and revert the thing if nothing else helps. Title: Re: Win32 build error on 12/31 CVS Post by: OldShofixti on January 01, 2003, 05:32:11 am I'm indeed using VC 6, which AFAIK doesn't include SHFolder.LIB. I'll try building again with VC 7.
Another possible option is to use the LoadLibrary function to load the appropriate DLL into memory (shell32.dll or shfolder.dll, depending on the OS) and use the GetProcAddress function to export the SHFolderGetPathA symbol. This works similarly to a Visual Basic "Declare" statement. I don't have a patch handy (since I won't be able to have time to implement it) but this approach might do the trick. --OldShofixti |