Adding the ExternC modifier was not enough (same error), however "ExternC 
*const*" did the trick!

So probably the following should be added:

    *ExternC #ifndef DELAYIMP_INSECURE_WRITABLE_HOOKS const #endif* PfnDliHook 
__pfnDliFailureHook2
    = delayFailHook;

Have to run (far too late, midnight and I have to get up at 6:00 tomorrow). 
Will do a "nmake clean"
and "nmake" tomorrow.

---rony



On 01.05.2017 23:47, Rick McGuire wrote:
> This documentation for the hooks 
>
> https://msdn.microsoft.com/en-us/library/z9h1h6ty.aspx
>
> Shows a different declaration for this variable. Try adding the ExternC 
> modifier. That change is
> building fine for me. 
>
> Rick
>
> On Mon, May 1, 2017 at 5:44 PM, Rony G. Flatscher <rony.flatsc...@wu.ac.at
> <mailto:rony.flatsc...@wu.ac.at>> wrote:
>
>
>     On 01.05.2017 23:40, Rick McGuire wrote:
>>     Try removing the int and see if it makes a difference.
>     Just tried it, no it does not make a difference, same error: 
> redefinition, different modifiers.
>
>     ---rony
>
>>
>>
>>     On Mon, May 1, 2017 at 5:32 PM, Rony G. Flatscher 
>> <rony.flatsc...@wu.ac.at
>>     <mailto:rony.flatsc...@wu.ac.at>> wrote:
>>
>>
>>         On 01.05.2017 23:10, Rick McGuire wrote:
>>>         This has been encountered before. You need to have the correct 
>>> level of the SDK
>>>         installed. Mark Miesfeld always recommended this one: 
>>>
>>>         http://www.microsoft.com/en-us/download/details.aspx?id=8442
>>>         <http://www.microsoft.com/en-us/download/details.aspx?id=8442>
>>         Thank you! That is the version I have installed. When extending the 
>> INCLUDE environment
>>         symbol to point to the appropriate SDK Include directory (now 
>> "e:\Programme\Microsoft
>>         SDKs\Windows\v7.1\Include" on my system) it is able to compile the 
>> events.cpp file.
>>
>>         Much later it then there is a redefinition error:
>>
>>             [ 85%] Building CXX object
>>             
>> CMakeFiles/oodialog.dir/extensions/platform/windows/oodialog/oodPackageEntry.cpp.obj
>>             oodPackageEntry.cpp
>>             
>> G:\oorexx.tmp\oorexxSVN\main\trunk\extensions\platform\windows\oodialog\*oodPackageEntry.cpp(444)*:
>>             error C2373: "__pfnDliFailureHook2": 
>> Neudefinition;unterschiedliche Modifizierer
>>             E:\Programme\Microsoft Visual Studio 
>> 14.0\VC\INCLUDE\*delayimp.h(141)*: note: Siehe
>>             Deklaration von "__pfnDliFailureHook2" NMAKE : fatal error U1077:
>>             "E:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe": Rückgabe-Code "0x2" 
>> Stop. NMAKE : fatal error
>>             U1077: ""E:\Programme\Microsoft Visual Studio 
>> 14.0\VC\BIN\nmake.exe"": Rückgabe-Code
>>             "0x2" Stop.
>>
>>         oodPackageEntry.cpp defines:
>>
>>             FARPROC WINAPI delayFailHook(*unsigned **int *dliNotify, 
>> PDelayLoadInfo pdli) {
>>             switch (dliNotify) { case dliFailLoadLib : printf("Failed to 
>> load %s, error code: %d.
>>             Ensure %s is available.\n", pdli->szDll, pdli->dwLastError, 
>> pdli->szDll); break; case
>>             dliFailGetProc : if (pdli->dlp.fImportByName) { printf("Failed 
>> to get procedure: %s
>>             in %s. Last error: %d\n", pdli->dlp.szProcName, pdli->szDll, 
>> pdli->dwLastError); }
>>             else { printf("Failed to get procedure, ordinal: %s in %s. Last 
>> error: %d\n",
>>             pdli->dlp.szProcName, pdli->szDll, pdli->dwLastError); } break; 
>> default :
>>             printf("Unknown error trying to delay load %s.\n", pdli->szDll); 
>> break; } printf("The
>>             error is unrecoverable, have to abort.\n"); return NULL; } 
>> *PfnDliHook
>>             __pfnDliFailureHook2 = delayFailHook; // <-- line 444*
>>
>>         delayimp.h defines:
>>
>>             typedef FARPROC (WINAPI *PfnDliHook)( *unsigned * dliNotify, 
>> PDelayLoadInfo pdli );
>>
>>         The difference seems to be that oodPackageEntry.cpp defines 
>> "unsigned int" and delyimp.h
>>         "unsigned" (without "int") for the dliNotify argument. (If it makes 
>> a difference: my MSC
>>         compiler is from the "professional" Visual Studio 2015 edition, 
>> maybe it is pickier.)
>>         ---rony
>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to