The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 04, 2022, 03:13:02 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Win32 build error on 12/31 CVS
« previous next »
Pages: [1] Print
Author Topic: Win32 build error on 12/31 CVS  (Read 2298 times)
OldShofixti
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Win32 build error on 12/31 CVS
« 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
« Last Edit: January 01, 2003, 01:06:44 am by OldShofixti » Logged
serendipity
Zebranky food
*
Offline Offline

Posts: 16


Personal text is for weenies.


View Profile
Re: Win32 build error on 12/31 CVS
« Reply #1 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?
Logged
Mika
Core Team
*Many bubbles*
*****
Offline Offline

Gender: Male
Posts: 121



View Profile WWW
Re: Win32 build error on 12/31 CVS
« Reply #2 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.
Logged
OldShofixti
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Re: Win32 build error on 12/31 CVS
« Reply #3 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
« Last Edit: January 01, 2003, 05:32:41 am by OldShofixti » Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!