博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何在VC下将mak文件导入 .
阅读量:2397 次
发布时间:2019-05-10

本文共 1870 字,大约阅读时间需要 6 分钟。

 

转载自

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

参考代码下载地址

最近学校申请的项目立项了,总得做点什么,开始动手找一些经典的开源代码,下来一个,结果只有一堆.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  
你可能感兴趣的文章
Servlet--关于RequestDispatcher(forward、include)的原理
查看>>
Servlet--Cookie原理及API使用详解
查看>>
Servlet--Session原理及API的使用
查看>>
Servlet--三个作用域(Request、Session、ServletContext)总结
查看>>
Listener--监听器的分类、功能及API详解
查看>>
Listener--ServletContextListener接口的使用详解
查看>>
Listener--HttpSessionListener、ServletRequestListener接口的使用详解
查看>>
Listener--HttpSessionBindingListenerAPI及使用(在线人数统计)详解
查看>>
Listener--HttpSessionActivationListener(钝化、活化)API、配置和使用详解
查看>>
Web--使用Filter和Cookie实现自动登录
查看>>
Web--Filter使用装饰器模式解决全站中文乱码问题
查看>>
JS--JavaScript入门(script标签使用与外部JavaScript文件引入)
查看>>
Struts2--非表单标签
查看>>
MyBatis--工作原理
查看>>
Maven--插件的获取和配置
查看>>
MySQL--基础四(排序查询)
查看>>
MySQL--基础五(单行函数)
查看>>
MySQL--基础六(分组函数)
查看>>
MySQL--基础七(分组查询、排序查询)
查看>>
MySQL--基础八(连接查询)
查看>>