#1456 w32api 3.14 cannot link SetProcessDEPPolicy call


Expected result: MinGW able to build program with SetProcessDEPPolicy call; actual result: MinGW with latest w32api can compile but not link such a program.

MinGW does not appear to export the Win32 SetProcessDEPPolicy (see http://msdn.microsoft.com/en-us/library/bb736299%28VS.85%29.aspx ) call in its link libraries. w32api 3.13 added it to the headers (see http://old.nabble.com/New-Release:-w32api-3.13-td20866320.html ), but whilst compiling works fine, linking fails (see attached file for this program):

C:\Users\User>gcc -Wall -pedantic -ansi -c spdp_test.c

C:\Users\User>gcc -Wall -pedantic -ansi spdp_test.c
C:\Users\User\AppData\Local\Temp\cc6KmPer.o:spdp_test.c:(.text+0x1e): undefined reference to `SetPro
collect2: ld returned 1 exit status

According to the MSDN page linked, this function lives in kernel32.dll; well, running nm on MinGW\lib\libkernel32.a finds no DEP functions exported.

Version information:
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.5.0/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-
sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-lib
stdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw

Thread model: win32
gcc version 4.5.0 (GCC)

GNU ld (GNU Binutils) 2.20

In _mingw.h: #define __MINGW32_VERSION 3.18
In w32api.h: #define __W32API_VERSION 3.14


  • cologic

    cologic - 2010-07-21

    Test program which does nothing but call SetProcessDEPPolicy

  • Chris Sutcliffe

    Chris Sutcliffe - 2010-07-21

    I've regenerated kernel32.def to capture the missing function export. Thank you for the test case to validate the fix. This will be included in the next w32api release.

  • Chris Sutcliffe

    Chris Sutcliffe - 2010-07-21
    • assigned_to: nobody --> ir0nh34d
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks