在 Visual Studio 2010 上使用 .mak 文件

发布于 2024-10-12 19:34:34 字数 353 浏览 4 评论 0原文

我正在尝试在 Windows 上测试 live555 库 (live555.com)。以下是说明:http://www.live555.com/liveMedia/#config-windows< /a>

我设法生成了 .mak 文件,但现在我不知道如何在 Visual Studio 2010 中使用它们来启动任何应用程序(如 openRTSP 或 playSIP)。

如何在 Visual Studio 2010 中使用或打开 .mak 文件?

感谢您的帮助。 问候!

I'm trying to test the live555 libraries (live555.com) on Windows. Here are the instructions: http://www.live555.com/liveMedia/#config-windows

I managed to generate the .mak files, but now I do not know how to use them in Visual Studio 2010 to start any of the applications (as openRTSP or playSIP).

How I can use or open .mak files in Visual Studio 2010?

Thanks for the help.
Greetings!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风筝在阴天搁浅。 2024-10-19 19:34:34

在尝试使用 Visual Studio 2012 编译 live555 时,我遇到了类似的问题。这是我需要做的一些事情来构建它。项目 3+ 基于这些使用 vs2008 编译 live555 的说明

1) 我必须将 nmake.exe 从另一个位置(它在其他地方)复制到 VC\bin 目录中。请参阅社交 MSDN 页面 了解更多信息。

2)此外,我还必须从 .mak 文件中删除问号(例如“前缀?=...”)以进行条件分配,否则无法构建(错误是“左侧的名称太多”) =>)。

3) 打开“win32config”文件并将 TOOLS32=... 变量更改为
你的VS2008安装目录。对我来说,它是 TOOLS32=C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC

4) 在“win32config”中,修改
LINK_OPTS_0=...从 msvcirt.lib 到 msvcrt.lib 的行。这修复了
链接错误:LINK:致命错误 LNK1181:无法打开输入文件
'msvcirt.lib'

5) 打开 Visual Studio 命令提示符。
从“live”源目录中,运行 genWindowsMakefiles

6) 现在您已准备好构建。只需运行以下命令:

cd liveMedia
nmake /B -f liveMedia.mak

cd ..\groupsock
nmake /B -f groupsock.mak
cd ..\UsageEnvironment
nmake /B -f UsageEnvironment.mak
cd ..\BasicUsageEnvironment
nmake /B -f BasicUsageEnvironment.mak
cd ..\testProgs
nmake /B -f testProgs.mak
cd ..\mediaServer
nmake /B -f mediaServer.mak

In trying to compile live555 with Visual Studio 2012 I had similar issues. Here's some stuff I needed to do to make it build. Items 3+ are based on these instructions for compiling live555 with vs2008

1) I had to copy nmake.exe into the VC\bin directory from another location (it was somewhere else). See social MSDN page for more info.

2) In addition I also had to remove question marks from the .mak files ("prefix? =...", for example) for conditional assignment or it wouldn't build (the error was "too many names to the left of =").

3) Open the ‘win32config’ file and change the TOOLS32=... variable to
your VS2008 install directory. For me, it’s TOOLS32=C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC

4) In ‘win32config’, modify the
LINK_OPTS_0=... line from msvcirt.lib to msvcrt.lib. This fixes the
link error: LINK : fatal error LNK1181: cannot open input file
'msvcirt.lib'

5) Open the Visual Studio command prompt.
From the ‘live’ source directory, run genWindowsMakefiles

6) Now you’re ready to build. Simply run the following commands:

cd liveMedia
nmake /B -f liveMedia.mak

cd ..\groupsock
nmake /B -f groupsock.mak
cd ..\UsageEnvironment
nmake /B -f UsageEnvironment.mak
cd ..\BasicUsageEnvironment
nmake /B -f BasicUsageEnvironment.mak
cd ..\testProgs
nmake /B -f testProgs.mak
cd ..\mediaServer
nmake /B -f mediaServer.mak
筱果果 2024-10-19 19:34:34

据我所知,您无法在最近的视觉工作室中打开 .maks - 您必须从命令行编译它们。

打开 Visual Studio 命令提示符(或在常规命令提示符下从 VS Common\Tools 目录运行 vsvars32.bat),然后尝试

nmake /f abc.mak

我感觉您可以在 VS6 中打开 makefile,但不记得了 - 它可能有而是生成它们。

As far as I know you can't open .maks in recent visual studios - you have to compile them from the command-line instead.

Open a Visual Studio command prompt (or run vsvars32.bat from the VS Common\Tools directory in a regular command prompt) then try

nmake /f abc.mak

I've a feeling you could open makefiles them way back in VS6 but can't remember - it might have been generate them instead.

余罪 2024-10-19 19:34:34

下载并构建“Visual Studio 2017 Community”脚本,需要 C++ 功能(Visual Studio 的安装对话框)7Zip。

安装live555.cmd

PowerShell (New-Object System.Net.WebClient).DownloadFile('http://www.live555.com/liveMedia/public/live555-latest.tar.gz','live555-latest.tar.gz');
"%PROGRAMFILES%\7-Zip\7z.exe" x -aoa live555-latest.tar.gz
"%PROGRAMFILES%\7-Zip\7z.exe" x -aoa live555-latest.tar

powershell -Command "(gc live\win32config) -replace '!include    <ntwin32.mak>', '#!include    <ntwin32.mak>' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'c:\\Program Files\\DevStudio\\Vc', 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace '\(TOOLS32\)\\bin\\cl', '(TOOLS32)\bin\HostX86\x64\cl' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'LINK =         \$\(link\) -out:', 'LINK = link ws2_32.lib /out:' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'LIBRARY_LINK =     lib -out:', 'LIBRARY_LINK = lib /out:' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'msvcirt.lib', 'msvcrt.lib' | Out-File live\win32config"

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x64

cd live

call genWindowsMakefiles

cd liveMedia
del *.obj *.lib
nmake /B -f liveMedia.mak
cd ..\groupsock
del *.obj *.lib
nmake /B -f groupsock.mak
cd ..\UsageEnvironment
del *.obj *.lib
nmake /B -f UsageEnvironment.mak
cd ..\BasicUsageEnvironment
del *.obj *.lib
nmake /B -f BasicUsageEnvironment.mak
cd ..\testProgs
del *.obj *.lib
nmake /B -f testProgs.mak
cd ..\mediaServer
del *.obj *.lib
nmake /B -f mediaServer.mak
cd ..

pause

Download and build script for "Visual Studio 2017 Community", C++ Features required (Setup Dialog of Visual Studio) 7Zip is also required.

install-live555.cmd

PowerShell (New-Object System.Net.WebClient).DownloadFile('http://www.live555.com/liveMedia/public/live555-latest.tar.gz','live555-latest.tar.gz');
"%PROGRAMFILES%\7-Zip\7z.exe" x -aoa live555-latest.tar.gz
"%PROGRAMFILES%\7-Zip\7z.exe" x -aoa live555-latest.tar

powershell -Command "(gc live\win32config) -replace '!include    <ntwin32.mak>', '#!include    <ntwin32.mak>' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'c:\\Program Files\\DevStudio\\Vc', 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace '\(TOOLS32\)\\bin\\cl', '(TOOLS32)\bin\HostX86\x64\cl' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'LINK =         \$\(link\) -out:', 'LINK = link ws2_32.lib /out:' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'LIBRARY_LINK =     lib -out:', 'LIBRARY_LINK = lib /out:' | Out-File live\win32config"
powershell -Command "(gc live\win32config) -replace 'msvcirt.lib', 'msvcrt.lib' | Out-File live\win32config"

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x64

cd live

call genWindowsMakefiles

cd liveMedia
del *.obj *.lib
nmake /B -f liveMedia.mak
cd ..\groupsock
del *.obj *.lib
nmake /B -f groupsock.mak
cd ..\UsageEnvironment
del *.obj *.lib
nmake /B -f UsageEnvironment.mak
cd ..\BasicUsageEnvironment
del *.obj *.lib
nmake /B -f BasicUsageEnvironment.mak
cd ..\testProgs
del *.obj *.lib
nmake /B -f testProgs.mak
cd ..\mediaServer
del *.obj *.lib
nmake /B -f mediaServer.mak
cd ..

pause
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文