[rt.cpan.org #55660] [PATCH] Partial win64 support for Win32::API

[email protected] ("Cosimo Streppone via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Sun May 09 09:09:00 2010: Request 55660 was acted upon.
Transaction: Correspondence added by COSIMO
       Queue: Win32-API
     Subject: [PATCH] Partial win64 support for Win32::API
   Broken in: (no value)
    Severity: (no value)
       Owner: COSIMO
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55660 >


On Sun May 09 08:50:52 2010, [email protected] wrote:
> 
> ----- Original Message -----
> From: "Sisyphus" <[email protected]>
> 
> > In any case, I'll try to rebuild the API_test64.dll when I get the
> time -
> 
> Yes, I think that fixes the problem. The only test script that now
> fails is
> 01_Struct.t.
> 
> I built the API_test64.dll manually by running:
> 
> cl -c API_test.cpp
> cl /LD API_test.obj API_test.def bufferoverflowU.lib
> I then renamed the API_test.dll that was produced, to API_test64.dll.

Excellent.

Please send me your API_test64.dll.
I'll include it in the distribution.
I know that's not optimal, but at least we can move forward.

> For that to work, in API_test.h, I had to first change:
> 
> #ifdef API_TEST_EXPORTS
> #define API_TEST_API  __declspec(dllexport)
> #else
> #define API_TEST_API  __declspec(dllimport)
> #endif
> 
> to:
> 
> #ifdef API_TEST_EXPORTS
> #define API_TEST_API  /* __declspec(dllexport) */
> #else
> #define API_TEST_API  /* __declspec(dllimport) */
> #endif
> 
> Otherwise, when trying to compile the obj file, I got errors of the
> type:
> 
> API_test.cpp(31) : error C2491: 'nAPI_test' : definition of dllimport
> data
> not allowed
> API_test.cpp(33) : error C2491: 'sum_integers' : definition of
> dllimport
> function not allowed
> API_test.cpp(37) : error C2491: 'sum_integers_ref' : definition of
> dllimport
> function not allowed
> [and more similar]

That's strange. I don't understand.
I'm trying to get access to a x64 environment with a working MSVC, to 
test this. It's not so easy atm.

Thanks guys for your contribution on this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.