Compilation with winegcc vs compilation in Wine source

Ruslan Kabatsayev b7.10110111 at gmail.com
Tue Aug 16 22:03:32 CDT 2016


On Tue, Aug 16, 2016 at 10:30 PM, Ken Thomases <ken at codeweavers.com> wrote:
> On Aug 16, 2016, at 1:57 PM, Ruslan Kabatsayev <b7.10110111 at gmail.com> wrote:
>>
>> Hello all,
>>
>> I'm trying to integrate my program into Wine source and having some
>> difficulties with doing OpenGL calls. Namely, when I compile the
>> program with mingw and with winegcc, it works flawlessly. But when I
>> integrate it into Wine source tree (taking regedit as an example),
>> stack appears smashed after OpenGL calls.
>
>> Apparently in-tree compilation assumes another calling convention for
>> glLightModelfv here...
>> What could be the reason for this? How should I set up my Makefile.in
>> so that it generated a result compatible with opengl32 calling
>> convention?
>
> What headers are you including in the C code?  This is probably a result of not having the proper declarations, which would be decorated with calling convention specifications.

As I can see, the system <GL/gl.h> header is included (visible when I
add an extra function argument and see the file referred to by the
compiler in its error message). But I don't find gl.h in Wine source
tree, so I guess this should be OK, no?

>
> -Ken
>



More information about the wine-devel mailing list