<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 <wine_install_dir>/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>> Date: Thu, 11 Dec 2008 09:32:53 +0100<br>> From: thunderbird2k@gmx.net<br>> Subject: Re: compiling Windows code with g++ on Linux using msvcrt - good idea?        if so, how do you do it?<br>> To: foobarbaz99@hotmail.com; wine-devel@winehq.org<br>> <br>> > <br>> > Hi,<br>> > <br>> > I have a huge amount of Windows code that I'm porting to Linux.<br>> > <br>> > Wine is turning out to be a read godsend, thank you guys!<br>> > <br>> > Anyway, I've had tons of luck including the directory<br>> > <wine_dir>/include/wine/windows in my include path. All my Windows types are there and<br>> > everything is wonderful. I've even been able to link against the libraries by<br>> > renaming, for example, foo.dll.so to libfoo.so and using -lfoo on the g++<br>> > command line.<br>> > <br>> > I actually haven't got all my functions defined so I don't know if this<br>> > will actually run yet because the link isn't complete yet.<br>> > <br>> > My first question is whether this will work. Will all my Windows functions<br>> > with function declarations defined in the windows directory and code<br>> > compiled into foo.dll.so actually run?<br>> > <br>> > Second, I see that some of the functions I want to use are actually<br>> > defined by headers in the msvcrt directory. However, this directory contains tons<br>> > of header files that my system (and gcc) also have under /usr/include and<br>> > gcc's own directories. I understand that msvcrt is Windows lib c, but I<br>> > wonder how I'm supposed to use it with gcc to compile? I've tried -nostdinc to<br>> > gcc, but the number of errors I get is enormous.<br>> > <br>> > It's not the end of the world if I can't use Wine's msvcrt, but if I could<br>> > use it, it would define dozens more functions on which my program relies,<br>> > or if its use was mandatory in order to get the functions implemented in<br>> > foo.dll.so to work, then obviously I wonder how I'm supposed to compile my<br>> > Windows code with Wine to make everything work?<br>> > <br>> > I'm sorry if this is a dumb question. I can't find a way to search the<br>> > wine-devel mailing list other than with google and I can't find anything on<br>> > there or other docs that answer this question, which I'm sure has been asked<br>> > a million times and has a simple answer.<br>> > <br>> > Thank you thank you,<br>> > <br>> > Jeff<br>> > <br>> > _________________________________________________________________<br>> > Send e-mail faster without improving your typing skills.<br>> > http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008<br>> <br>> 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>> <br>> Roderick<br>> -- <br>> Sensationsangebot verl�ngert: GMX FreeDSL - Telefonanschluss + DSL <br>> 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>