I'm running into a problem importing the latest Wine winmm sources. The resource file winmm_res.rc now contains Unicode strings (in the CORE and VIDEODISC resources). Windres from binutils 2.15.94 doesn't like those.
I'm not sure how to solve this. Any ideas?
Gé van Geldorp.
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Ge van Geldorp Sent: 14. februar 2005 16:48 To: 'ReactOS Development List' Subject: [ros-dev] Problem synchronizing winmm.dll
I'm running into a problem importing the latest Wine winmm sources. The resource file winmm_res.rc now contains Unicode strings (in the CORE and VIDEODISC resources). Windres from binutils 2.15.94 doesn't like those.
I'm not sure how to solve this. Any ideas?
Gé van Geldorp.
Use wrc?
Casper
From: Casper Hornstrup
From: Ge van Geldorp
I'm running into a problem importing the latest Wine winmm sources. The resource file winmm_res.rc now contains Unicode strings (in the CORE and VIDEODISC resources). Windres from binutils 2.15.94 doesn't like those.
I'm not sure how to solve this. Any ideas?
Use wrc?
Ok, we can do that, but it won't be pretty....
First of all, we need to run wrc on the host, meaning that when cross-compiling under Linux wrc needs to be a Linux executable. wrc depends on some Unicode stuff. We could replace it with MultiByteToWideChar et al when running on Windows, but that won't work for Linux. The easiest way around that is to import the Wine Unicode library, which Thomas just managed to remove....
Next problem is that we use #include_next a lot in our headers, especially for Wine stuff. The built-in preprocessor in wrc doesn't understand that. Luckily, Filip had a patch floating around in his tree implementing #include_next.
But the built-in preprocessor can't find "standard" include files like stdlib.h on Windows. On Linux it's no problem, just go to /usr/include. There's no such standard place on Windows. So, the solution I opted for was to use "gcc -E" to do the preprocessing. gcc "knows" where to find its include files.
Final problem is that wrc doesn't output .coff files, it creates "MSVC .res" files. Luckily, windres can convert those to .coff files...
So, the final solution looks like this: - Preprocess .rc file using "gcc -E" to create .rci file - Run wrc on .rci file to create .res file - Run windres on .res file to create .coff file
As I said, it works but it ain't pretty... I've created a patch file ftp://ftp.geldorp.nl/pub/ReactOS/wrc.patch and a zip file ftp://ftp.geldorp.nl/pub/ReactOS/wrc.zip. Unpack the zip file in reactos/tools/wrc and apply the patch. "winedll" targets will then use wrc. If nobody objects, I'll commit this weekend.
Gé van Geldorp.
--- Ge van Geldorp gvg@reactos.com wrote:
I'm not sure how to solve this. Any ideas?
I still think we should use WRC to preprocess resource files so we don't have to worry about minor glitches from one windres version to another. We are going to need it anyway if the ELF port works out as binutils does not build windres unless its a mingw target.
Thanks Steven
__________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250