Mingw build error in SpecialSystemDirectory.cpp, error: `::SHGetSpecialFolderPathW' has not been declared

RESOLVED FIXED

Status

()

RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: martijn.martijn, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

12 years ago
After updating my Mozilla mingw build, I get this build error:

=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSIFIER=1 -DMOZ_LOGGING=1 -DHAVE___CXA_DEM
ANGLE=1 -DMOZ_DEMANGLE_SYMBOLS=1 -DMOZ_USER_DIR=\"Mozilla\" -DHAVE_STDINT_H=1 -D
HAVE_INTTYPES_H=1 -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF
=1 -DMOZ_MORK=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS_THREADSAFE=1 -
DMOZ_REFLOW_PERF=1 -DMOZ_REFLOW_PERF_DSP=1 -DMOZILLA_LOCALE_VERSION=\"1.9a1\" -D
MOZILLA_REGION_VERSION=\"1.9a1\" -DMOZILLA_SKIN_VERSION=\"1.8\"  -D_MOZILLA_CONF
IG_H_ -DMOZILLA_CLIENT /cygdrive/c/mozilla/mozilla/xpcom/io/SpecialSystemDirecto
ry.cpp
c:/mozilla/mozilla/xpcom/io/SpecialSystemDirectory.cpp: In function `nsresult Ge
tWindowsFolder(int, nsILocalFile**)':
c:/mozilla/mozilla/xpcom/io/SpecialSystemDirectory.cpp:177: error: `::SHGetSpecialFolderPathW' has not been declared
make[5]: *** [SpecialSystemDirectory.o] Error 1
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/xpcom/io'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/xpcom'
make[3]: *** [libs_tier_xpcom] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[2]: *** [tier_xpcom] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [alldep] Error 2

I suspect this is caused by the fix for bug 359808, somehow.
(Reporter)

Comment 1

12 years ago
Created attachment 246102 [details]
shlobj.h file in the mingw include directory

So there is mention of the SHGetSpecialFolderPathW function in this file which is residing in the mozilla include dir. But apparently it is not recognized or something?
> #if (_WIN32_IE >= 0x0400)
Probably We should declare |_WIN32_IE=0x400|. There is no harm to assume we have shell32.dll 4.71 or later because Win2k or later will always satisfy the requirement.

Comment 3

12 years ago
Created attachment 246146 [details] [diff] [review]
patch

Thanks, Martijn and Masatoshi.

Does this work?
(Reporter)

Comment 4

12 years ago
(In reply to comment #3)
> Does this work? 

Yes, thanks, that fixes the build issue for me.

Comment 5

12 years ago
Comment on attachment 246146 [details] [diff] [review]
patch

asking cls for r/sr.
Attachment #246146 - Flags: superreview?(cls)
Attachment #246146 - Flags: review?(cls)

Comment 6

12 years ago
Comment on attachment 246146 [details] [diff] [review]
patch

I think that _WIN32_IE should be defined globally like we do for WINVER & _WIN32_WINNT in configure.in.
Attachment #246146 - Flags: superreview?(cls)
Attachment #246146 - Flags: review?(cls)
Attachment #246146 - Flags: review-

Comment 7

12 years ago
Created attachment 246654 [details] [diff] [review]
v2.0

Set _WIN32_IE in configure.in
Attachment #246146 - Attachment is obsolete: true
Attachment #246654 - Flags: review?(benjamin)

Comment 8

12 years ago
Comment on attachment 246654 [details] [diff] [review]
v2.0

After reading up a bit, _WIN32_IE needs to be set independently of _WIN32_WINNT.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/using_the_windows_headers.asp
Attachment #246654 - Flags: review?(benjamin)

Comment 9

12 years ago
Created attachment 246707 [details] [diff] [review]
v2.1

Set _WIN32_IE=0x0400 (require IE 4.0 features) independently of WINVER.
Attachment #246654 - Attachment is obsolete: true
Attachment #246707 - Flags: review?(benjamin)

Updated

12 years ago
Attachment #246707 - Flags: review?(benjamin) → review+

Comment 10

12 years ago
Checking in configure;
/cvsroot/mozilla/configure,v  <--  configure
new revision: 1.1756; previous revision: 1.1755
done
Checking in configure.in;
/cvsroot/mozilla/configure.in,v  <--  configure.in
new revision: 1.1747; previous revision: 1.1746
done
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.