Resource file and linking C++ project using winelib

Sergio sergio.t at videotron.ca
Wed Nov 2 06:48:09 CST 2005


OK. I have solved the problem. I will explain it a little just in case
someone runs into the same 'problem'.

First of all, linking res files in c++ projects works fine.
My problem was that the MainDll function in the source lacked << extern "C"
>> in its declaration. Inside that function the plugin copies the HINSTNACE
to a global that it is heavily used in the source. This signature problem
caused the funciton not to be 'called' and the hinstance finished holding
an invalid reference (my bet is that it was holding the main
application's). Changing that makes the whoel thing work.

Now my question is: how's it that VC++ did not need that?


Sergio wrote:

> Hi all,
> 
> I am porting an application from windows to linux (Miranda IM, a
> multiprotocol IM program). I have just run into one problem: the file gets
> compiled and runs, but the resources (icons, dialogs, images) do not seem
> to be working (i.e.: they are simply not shown). Sometimes, I am getting
> this message in the console each time I try to open certain dialogs:
> err:win:CreateWindowExA bad class name "??????ly t\x10"
> Other, a different dialog (and not present in my plugin, just one from the
> main application) gets opened.
> 
> What I am doing in fact is making some of the application's plugins and I
> am getting this problem only with two plugins that were developed in C++.
> I have succesfully compiled and made work the ones that were written in C.
> 
> My question: is this problem related to generating / linking to the .res
> file? Is there a way of solving it? Did anyone here have the same problem
> and manage to make it work? Has anyone here tried to link a C++ project
> using winelib and did not experience this problem?
> 
> Thank you very much. I am really lost and your help will be highly
> appreciated. Sergio.





More information about the wine-devel mailing list