linux使用wineIf you use Linux, you probably know about WINE. This handy program can run many different kinds of Windows programs. I personally use it to run Office (but be careful; not all versions ...
If you use Linux, you probably know about WINE. This handy program can run many different kinds of Windows programs. I personally use it to run Office (but be careful; not all versions work well). It also runs a few other programs when I just can’t get Linux equivalent. You probably already have WINE installed and if you don’t, you can get it from your distribution’s package manager. However, most people don’t use it to its full potential. There’s a handy tool, Q4Wine, that will make using WINE much easier, but you don’t have to use it to get most of the benefits.
Using WINE is pretty easy. Suppose you have WINWORD.EXE somewhere on your hard drive. All you have to do is run:
使用WINE非常简单。 假设您的硬盘驱动器上某处有WINWORD.EXE。 您所要做的就是运行：
Sounds simple, right? Well, it is, but then again it isn’t. If you only had WINWORD.EXE there, you probably don’t have all the other ancillary files it needs. The right thing to do is run the installer under WINE first. That will install the programs you need — usually. You might also need to run Winetricks to download things like fonts and DLLs. Sometimes you can get an idea if a program will run and what special things might be needed by reading the WINEHQ App Database.
There is one big problem, though. By default, WINE makes a fake C drive for you (usually at ~/.wine/drive_c). As you install things, you get the same problems real Windows users have. The 5th program you install might upgrade a DLL that the 2nd program doesn’t like. Luckily, there is a very simple fix for that.
When WINE starts, it looks for an environment variable called WINEPREFIX. If it is set, that is where the configuration for this WINE session will reside. So before installing Office, you might create a directory ~/msoffice and then say:
Now, every time you start an Office program you’ll need to provide the same WINEPREFIX. All the programs will use ~/msoffice/drive_c as their C drive. Other programs will either use the default or a different prefix.
I try to do nothing in the default prefix. Every program gets its own prefix. That way if something is wrong with that program it doesn’t affect the others. If I want to wipe out and start over, I won’t kill every other Windows program I installed.
gcc -c -I. -I. -Ihttp://www.cnblogs.com/include -Ihttp://www.cnblogs.com/include -I/usr/local/include/freetype2 -I/usr/local/include -D__WINESRC__ -D_GDI32_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -g -O2 -o freetype.o freetype.c freetype.c:166: error: 'FT_MulFix' undeclared here (not in a function) freetype.c:166: warning: type defaults to 'int' in declaration of 'pFT_MulFix' freetype.c: In function 'WineEngGetOutlineTextMetrics': freetype.c:5009: error: called object 'pFT_MulFix' is not a function freetype.c:5010: error: called object 'pFT_MulFix' is not a function freetype.c:5012: error: called object 'pFT_MulFix' is not a function