Thread overview | |||||
---|---|---|---|---|---|
|
August 10, 2017 DLL loading behaviors and pragma(lib) | ||||
---|---|---|---|---|
| ||||
I've been working on getting OpenGL to load on windows without a library, and encountered something curious; Context creation fails when I try to use the function pointer retrieved through GetProcAddress, but works just fine with the statically linked version provided through core.sys.windows.wingdi.d. This may be a stupid question, but why is this? Thanks. |
August 11, 2017 Re: DLL loading behaviors and pragma(lib) | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Zhang | On 11/08/2017 12:18 AM, David Zhang wrote:
> I've been working on getting OpenGL to load on windows without a library, and encountered something curious;
>
> Context creation fails when I try to use the function pointer retrieved through GetProcAddress, but works just fine with the statically linked version provided through core.sys.windows.wingdi.d.
>
> This may be a stupid question, but why is this?
>
> Thanks.
Odd.
Just to confirm your wglGetProcAddress, is extern(Windows/System)?
And it is non-null after being loaded?
|
August 11, 2017 Re: DLL loading behaviors and pragma(lib) | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | On Friday, 11 August 2017 at 04:50:48 UTC, rikki cattermole wrote:
> On 11/08/2017 12:18 AM, David Zhang wrote:
>> I've been working on getting OpenGL to load on windows without a library, and encountered something curious;
>>
>> Context creation fails when I try to use the function pointer retrieved through GetProcAddress, but works just fine with the statically linked version provided through core.sys.windows.wingdi.d.
>>
>> This may be a stupid question, but why is this?
>>
>> Thanks.
>
> Odd.
>
> Just to confirm your wglGetProcAddress, is extern(Windows/System)?
> And it is non-null after being loaded?
Yes.
|
Copyright © 1999-2021 by the D Language Foundation