如何在VC下将mak文件导入 .

 

转载自 http://blog.csdn.net/lantian1099/article/details/1833241

以下的内容只适合于EVC VC6,在VC2003版本以上不适用

参考代码下载地址

http://www.rayfile.com/zh-cn/files/8fa2a8a6-6fe5-11e1-b99b-0015c55db73d/

最近学校申请的项目立项了,总得做点什么,开始动手找一些经典的开源代码,下来一个,结果只有一堆.cpp和.h文件外加一个.mak文件,这一下子傻了,以前还从来没有碰到过这种东西,下来的都是.dsw或者.sin结尾的工程文件。

     那怎么样用VC把这些文件编译成库呢?问了几个人,也没什么进展。硬着头皮网上找资料,搜了N久,也没有找到合适的资料。突然想,这个代码的作者会不会考虑到我的痛苦,给出什么指点呢?于是乎,敲进URL,进去瞧了一下,真的有,下面是作者原话,我按照他的做法就可以了。
     How to configure and build the code on Windows
  1. Unpack and extract the '.tar.gz' file (using an application such as "WinZip").
  2. If the 'tools' directory on your Windows machine is something other than "c:/Program Files/DevStudio/Vc", change the "TOOLS32 =" line in the file "win32config".
  3. In a command shell, 'cd' to the "live" directory, and run
     genWindowsMakefiles
This will generate - in each subdirectory - a "*.mak" makefile suitable for use by (e.g.) Microsoft Visual Studio.
  • Alternatively, if you're starting from a Unix machine, you can generate the Windows Makefiles by running
     ./genWindowsMakefiles  
    (after - if necessary - changing the "TOOLS32 =" line in the file "win32config", as noted above). Then, copy the "live" directories and its subdirectories (in ASCII mode) to a Windows machine.
  • To use these Makefiles from within Visual Studio, use the "Open Workspace" menu command, then (in the file selection dialog) for "Files of type", choose "Makefiles (.mak)". Visual Studio should then prompt you, asking if you want to use this Makefile to set up a new project. Say "OK".
  • Doug Kosovic notes: Visual C++ 2003 no longer comes with the old I/O Streams headers iostreams.h et al, or the corresponding library msvcirt.lib. So anybody trying to build the LIVE555 code with VC++ 2003 might find the following useful: A non-sourcecode modification workaround for VC++ 2003 is to copy the missing headers and msvcirt.lib from VC++ 2002. In file 'win32config' add an extra -I switch to COMPILE_OPTS to find the old headers and a -LIBPATH: switch to LINK_OPTS_0 to find msvcirt.lib  

你可能感兴趣的:(windows,Microsoft,File,command,tools,makefile)