Unreal4 基礎代碼Link錯誤

1. Link符號錯誤:

常見的是路徑名和文件名的包含中文,空格之類的。
我遇到的問題是,UE4自己定義的類型,在VS中找不到。

解決方法

找到這個文件
[ROCKETINSTALL]/Engine/Extras/VisualStudioDebugging/UE4.natvis

複製該文件到以下位置:
[VSINSTALLDIR]/Common7/Packages/Debugger/Visualizers/UE4.natvis
[USERPROFILE]/My Documents/Visual Studio 2012/Visualizers/UE4.natvis

參考文章
Unreal4 入門(安裝):http://blog.sina.com.cn/s/blog_7c5fd2e90101ku0j.html
虛幻引擎4設置Visual Studio:http://www.unrealchina.net/portal.php?mod=view&aid=149

2. Link tbbmalloc.lib錯誤:

使用基礎代碼新建一個項目,什麼都不改,就是重新Build一次,就報錯:

LINK : fatal error LNK1181: cannot open input file 'tbbmalloc.lib'

問題原因:

這個lib在engine中有,但是版本不對。IntelTBB.Build.cs中,指定了VS2015用的是IntelTBB-4.4u3,VS2013用的是IntelTBB-4.0。
看來最新的引擎還是用VS2015省事。 家裏的電腦C盤沒地方了,不打算繼續裝VS2015了,一會把unreal4.12刪了,重新下個unreal4.5.1。

參考文章

http://stackoverflow.com/questions/21744464/opencv-error-link-fatal-error-lnk1104-cannot-open-file-opencv-core231d-lib


		if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
		{
			string IntelTBBPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "IntelTBB/";
			switch (WindowsPlatform.Compiler)
			{
				case WindowsCompiler.VisualStudio2015: IntelTBBPath += "IntelTBB-4.4u3/"; break;
				case WindowsCompiler.VisualStudio2013: IntelTBBPath += "IntelTBB-4.0/"; break;
			}
			if (Target.Platform == UnrealTargetPlatform.Win64)
			{
				if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)
				{
					PublicLibraryPaths.Add(IntelTBBPath + "lib/Win64/vc14");
				}
				else if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2013)
				{
					PublicLibraryPaths.Add(IntelTBBPath + "lib/Win64/vc12");
				}
			}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章