<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Roderick,<br><br>Thanks for your answer.<br><br>Unfortunately, I will not be able to use wineg++ for a variety of political reasons.<br><br>Is there anyway, even if it involves some non-standard hacking, to get the Windows functions defined in &lt;wine_install_dir&gt;/include/wine/windows to be compiled in a library that I can directly link to with g++ without using wineg++?<br><br>I mean, wine is all c code right? And it's compiled with the g++ on my system? <br><br>Has no one ever wanted to do this before?<br><br>Jeff<br><br>&gt; Date: Thu, 11 Dec 2008 09:32:53 +0100<br>&gt; From: thunderbird2k@gmx.net<br>&gt; Subject: Re: compiling Windows code with g++ on Linux using msvcrt - good idea?        if so, how do you do it?<br>&gt; To: foobarbaz99@hotmail.com; wine-devel@winehq.org<br>&gt; <br>&gt; &gt; <br>&gt; &gt; Hi,<br>&gt; &gt; <br>&gt; &gt; I have a huge amount of Windows code that I'm porting to Linux.<br>&gt; &gt; <br>&gt; &gt; Wine is turning out to be a read godsend, thank you guys!<br>&gt; &gt; <br>&gt; &gt; Anyway, I've had tons of luck including the directory<br>&gt; &gt; &lt;wine_dir&gt;/include/wine/windows in my include path. All my Windows types are there and<br>&gt; &gt; everything is wonderful. I've even been able to link against the libraries by<br>&gt; &gt; renaming, for example, foo.dll.so to libfoo.so and using -lfoo on the g++<br>&gt; &gt; command line.<br>&gt; &gt; <br>&gt; &gt; I actually haven't got all my functions defined so I don't know if this<br>&gt; &gt; will actually run yet because the link isn't complete yet.<br>&gt; &gt; <br>&gt; &gt; My first question is whether this will work. Will all my Windows functions<br>&gt; &gt; with function declarations defined in the windows directory and code<br>&gt; &gt; compiled into foo.dll.so actually run?<br>&gt; &gt; <br>&gt; &gt; Second, I see that some of the functions I want to use are actually<br>&gt; &gt; defined by headers in the msvcrt directory. However, this directory contains tons<br>&gt; &gt; of header files that my system (and gcc) also have under /usr/include and<br>&gt; &gt; gcc's own directories. I understand that msvcrt is Windows lib c, but I<br>&gt; &gt; wonder how I'm supposed to use it with gcc to compile? I've tried -nostdinc to<br>&gt; &gt; gcc, but the number of errors I get is enormous.<br>&gt; &gt; <br>&gt; &gt; It's not the end of the world if I can't use Wine's msvcrt, but if I could<br>&gt; &gt; use it, it would define dozens more functions on which my program relies,<br>&gt; &gt; or if its use was mandatory in order to get the functions implemented in<br>&gt; &gt; foo.dll.so to work, then obviously I wonder how I'm supposed to compile my<br>&gt; &gt; Windows code with Wine to make everything work?<br>&gt; &gt; <br>&gt; &gt; I'm sorry if this is a dumb question. I can't find a way to search the<br>&gt; &gt; wine-devel mailing list other than with google and I can't find anything on<br>&gt; &gt; there or other docs that answer this question, which I'm sure has been asked<br>&gt; &gt; a million times and has a simple answer.<br>&gt; &gt; <br>&gt; &gt; Thank you thank you,<br>&gt; &gt; <br>&gt; &gt; Jeff<br>&gt; &gt; <br>&gt; &gt; _________________________________________________________________<br>&gt; &gt; Send e-mail faster without improving your typing skills.<br>&gt; &gt; http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008<br>&gt; <br>&gt; Just compiling your program using g++ won't work as Wine needs to perform a lot of magic. For that reason Wine ships with its own gcc/g++ wrapper programs called winegcc/wineg++ both are mingw compatible. You should build your program using that and it won't have issues linking with wine libraries and it also allows you to link against linux libraries.<br>&gt; <br>&gt; Roderick<br>&gt; -- <br>&gt; Sensationsangebot verl�ngert: GMX FreeDSL - Telefonanschluss + DSL <br>&gt; f�r nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a<br><br /><hr />Suspicious message? There�s an alert for that.  <a href='http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008' target='_new'>Get your Hotmail� account now.</a></body>
</html>