使用Visual Studio 2013构建64位Live555 [英] Building 64bit Live555 with Visual Studio 2013

查看:132
本文介绍了使用Visual Studio 2013构建64位Live555的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 7上使用Visual Studio 2013 64bit构建Live555的组件.

I am trying to build the components of Live555 with Visual Studio 2013 64bit on Windows 7.

我尝试编辑win32config和* .mak文件,但未成功.我已经在互联网上搜索了几个小时,并尝试使用命令提示符进行各种操作.

I have tried editing win32config and the *.mak files without success. I've been searching the internet for a few hours and trying all kinds of things with command prompts.

由于某些原因,VS2013 x64命令提示符仍在构建32位静态库,我不知道为什么.

For some reason VS2013 x64 command prompt is still building 32bit static libs and I can't figure out why.

如果有人有什么好主意,那就太好了!

If anyone has any good ideas, that would be fantastic!

推荐答案

从.tar.gz文件中获取的win32config文件需要进行大量编辑才能使其与最新的SDK和MSVC ++版本兼容.这是产生干净版本的版本:

The win32config file that you get from the .tar.gz file requires substantial editing to make it compatible with recent SDK and MSVC++ releases. This is a version that produced a clean build:

NODEBUG=1
TARGETOS = WINNT

UI_OPTS =       $(guilflags) $(guilibsdll)
CONSOLE_UI_OPTS =   $(conlflags) $(conlibsdll)
CPU=amd64

COMPILE_OPTS =      $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. /EHsc /O2 /MD /GS /D "WIN64" /Oy- /Oi /D "NDEBUG"
C =         c
C_COMPILER =        cl
C_FLAGS =       $(COMPILE_OPTS)
CPP =           cpp
CPLUSPLUS_COMPILER =    $(C_COMPILER)
CPLUSPLUS_FLAGS =   $(COMPILE_OPTS)
OBJ =           obj
LINK =              link -out:
LIBRARY_LINK =      lib -out:
LINK_OPTS_0 =       $(linkdebug) ws2_32.lib /NXCOMPAT
LIBRARY_LINK_OPTS = 
LINK_OPTS =     $(LINK_OPTS_0) $(UI_OPTS)
CONSOLE_LINK_OPTS = $(LINK_OPTS_0) $(CONSOLE_UI_OPTS)
SERVICE_LINK_OPTS =     kernel32.lib advapi32.lib shell32.lib ws2_32.lib -subsystem:console,$(APPVER)
LIB_SUFFIX =        lib
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
MULTIMEDIA_LIBS =   winmm.lib
EXE =           .exe
PLATFORM = Windows

rc32 = rc.exe
.rc.res:
    $(rc32) $<

编辑此文件后,从bash(或CMD文件)运行genWindowsMakefiles命令.接下来,启动x64 Visual Studio命令提示符.确保您具有x64本机配置风格.发出以下命令:

After you've edited this file, run the genWindowsMakefiles command from bash (or the CMD file). Next, start the x64 Visual Studio Command Prompt. Make sure you got the x64 native configuration flavor of it. Issue the following commands:

cd c:\projects\live\liveMedia
nmake -f liveMedia.mak
cd ..\groupsock
nmake -f groupsock.mak
cd ..\UsageEnvironment
nmake -f UsageEnvironment.mak
cd ..\BasicUsageEnvironment
nmake -f BasicUsageEnvironment.mak
cd ..\testProgs
nmake -f testProgs.mak
cd ..\mediaServer
nmake -f mediaServer.mak

更改第一个命令以匹配放置源的目录. TODO项目:清理不起作用,它尝试使用* nix rf命令.最简单的解决方法是del * .obj强制编译器重建目标文件 .exe文件的构建没有清单.对测试程序无关紧要,我假设您只对.lib文件感兴趣 它会构建库和可执行文件的发行版,您必须调整COMPILE_OPTS才能获得调试版本.

Alter the first command to match the directory where you put the source. TODO items: cleaning doesn't work, it tries to use the *nix rf command. Simplest workaround is del *.obj to force the compiler to rebuild the object files the .exe files are built without a manifest. Shouldn't matter for the test programs, I assume you're only interested in the .lib files it builds the release version of the libraries and executables, you'll have to tweak the COMPILE_OPTS to get a debug build.

为了使用Visual Studio 2013编译64位本机代码,您需要 需要专业版.

In order to compile 64 bit native code with Visual Studio 2013, you require professional edition.

打开VS2013 x64本机工具命令提示符 然后,在将TOOLS32更正为VC/bin目录之后,确保将C_COMPILER设置为"$(TOOLS32)\ bin \ amd64 \ cl".

Open the VS2013 x64 Native Tools Command Prompt Then make sure you set C_COMPILER to "$(TOOLS32)\bin\amd64\cl" after correcting TOOLS32 to the VC/bin dir.

这篇关于使用Visual Studio 2013构建64位Live555的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆