#380 32-bit dll's lack SHValidateUNC

v1.0 (example)
closed-fixed
nobody
None
5
2014-02-17
2014-02-17
Jim Michaels
No

personal experimental build 4.9.0 sjlj posix

I get
df.o:df.cpp:(.text+0x270c): undefined reference to `_imp__SHValidateUNC@12'
collect2.exe: error: ld returned 1 exit status

Using built-in specs.
COLLECT_GCC=d:\x86_64-4.9.0-snapshot-20131119-rev205009-posix-sjlj-rt_v4\mingw64\bin\g++.exe
COLLECT_LTO_WRAPPER=d:/x86_64-4.9.0-snapshot-20131119-rev205009-posix-sjlj-rt_v4/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-trunk/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/d/mingwtrunk/x86_64-trunk-posix-sjlj-rt_v4/mingw64 --enable-shared --enable-static --enable-targets=all --enable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-sjlj-exceptions --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch-32=i686 --with-arch-64=nocona --with-tune-32=generic --with-tune-64=core2 --with-libiconv --with-system-zlib --with-gmp=/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static --with-mpc=/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static --with-isl=/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static --with-cloog=/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/d/mingwtrunk/x86_64-trunk-posix-sjlj-rt_v4/mingw64/opt/include -I/d/mingwtrunk/prerequisites/x86_64-zlib-static/include -I/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/d/mingwtrunk/x86_64-trunk-posix-sjlj-rt_v4/mingw64/opt/include -I/d/mingwtrunk/prerequisites/x86_64-zlib-static/include -I/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/d/mingwtrunk/x86_64-trunk-posix-sjlj-rt_v4/mingw64/opt/lib -L/d/mingwtrunk/prerequisites/x86_64-zlib-static/lib -L/d/mingwtrunk/prerequisites/x86_64-w64-mingw32-static/lib'
Thread model: posix
gcc version 4.9.0 20131119 (experimental) (Built by MinGW-W64 project)
COLLECT_GCC_OPTIONS='-m32' '-Wall' '-Wextra' '-v' '-save-temps' '-Ofast' '-std=c++11' '-s' '-isystem' '/libpq/' '-isystem' '/libpq/server/libpq/' '-isystem' '/prj/fltk/fltk-2.0.x-alpha-r9042/' '-isystem' '/prj/fltk/fltk-2.0.x-alpha-r9042/lib/' '-isystem' '/prj/zlib-1.2.5/' '-isystem' '/prj/boost/boost32' '-o' '32\df.exe' '-shared-libgcc' '-mtune=generic' '-march=i686'
d:/x86_64-4.9.0-snapshot-20131119-rev205009-posix-sjlj-rt_v4/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.0/cc1plus.exe -E -quiet -v -imultilib 32 -iprefix d:\x86_64-4.9.0-snapshot-20131119-rev205009-posix-sjlj-rt_v4\mingw64\bin../lib/gcc/x86_64-w64-mingw32/4.9.0/ -D_REENTRANT -isystem /libpq/ -isystem /libpq/server/libpq/ -isystem /prj/fltk/fltk-2.0.x-alpha-r9042/ -isystem /prj/fltk/fltk-2.0.x-alpha-r9042/lib/ -isystem /prj/zlib-1.2.5/ -isystem /prj/boost/boost32 df.cpp -m32 -mtune=generic -march=i686 -std=c++11 -Wall -Wextra -Ofast -fpch-preprocess -o df.ii
...
df.o:df.cpp:(.text+0x270c): undefined reference to `_imp__SHValidateUNC@12'
collect2.exe: error: ld returned 1 exit status

the function is listed in the header. with grep I get:
shlobj.h: SHSTDAPI_(WINBOOL) SHValidateUNC (HWND hwndOwner, PWSTR pszFile, UINT fConnect);

when I grep the 64-bit .a files, I get:
grep -is SHValidateUNC *
Binary file libshell32.a matches

grep imp__SHValidateUNC * (32-bit .a files)

(failure)

grep SHValidateUNC * (32-bit .a files)

(failure)

this tells me that the function is not [exposed/exported] in the 32-bit library.

so this does not match. I looked inside the file, and it is missing the leading _ OR there should not be one in the header.

for 64-bit target, things compile and link fine. but 32-bit target they fail.

1 Attachments

Discussion

  • Ozkan Sezer
    Ozkan Sezer
    2014-02-17

    • status: open --> closed-fixed
     
  • Ozkan Sezer
    Ozkan Sezer
    2014-02-17

    Added missing SHValidateUNC@12 to lib32/shell32.def in stable/v1.x, stable/v2.x and stable/v3.x in the svn at rev.6484. The trunk already has a def dump of a newer version of shell32.dll. Closing as fixed.