中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

模型下載網(wǎng)站開發(fā)流程廣州網(wǎng)頁制作

模型下載網(wǎng)站開發(fā)流程,廣州網(wǎng)頁制作,國外網(wǎng)站能否做百科參考資料,河北省建筑信息平臺配置: 日志庫文件github: GitHub - gabime/spdlog: Fast C logging library. 新建vendor文件夾 將下載好的spdlog放入 配置YOTOEngine的附加包含目錄: 配置Sandbox的附加包含目錄: 包裝spdlog: 在YOTO文件夾下創(chuàng)建…

配置:

日志庫文件github:

GitHub - gabime/spdlog: Fast C++ logging library.

新建vendor文件夾

將下載好的spdlog放入

配置YOTOEngine的附加包含目錄:

配置Sandbox的附加包含目錄:

包裝spdlog:

在YOTO文件夾下創(chuàng)建Log.cpp和log.h

log.h:

#pragma once
#include"Core.h"
#include<spdlog/spdlog.h>
#include "spdlog/sinks/stdout_color_sinks.h" 
namespace YOTO {class YOTO_API Log{public:static void Init();//inline是為了提高性能,相當(dāng)于直接把函數(shù)里的代碼段放在那里//返回的是Logger,分為服務(wù)器logger和核心loggerinline static  std::shared_ptr<spdlog::logger>  GetCoreLogger() { return s_CoreLogger; }inline static  std::shared_ptr<spdlog::logger>  GetClientLogger() { return s_ClientLogger; }private:static std::shared_ptr<spdlog::logger> s_CoreLogger;static std::shared_ptr<spdlog::logger>  s_ClientLogger;};
}
//Core 的log 的簡化
#define YT_CORE_ERROR(...)		::YOTO::Log::GetCoreLogger()->error(__VA_ARGS__)
#define YT_CORE_WARN(...)		::YOTO::Log::GetCoreLogger()->warn(__VA_ARGS__)
#define YT_CORE_INFO(...)		::YOTO::Log::GetCoreLogger()->info(__VA_ARGS__)
#define YT_CORE_TRACE(...)		::YOTO::Log::GetCoreLogger()->trace(__VA_ARGS__)
#define YT_CORE_FATAL(...)		::YOTO::Log::GetCoreLogger()->fatal(__VA_ARGS__)
//client 的log的簡化
#define YT_CLIENT_ERROR(...)	::YOTO::Log::GetClientLogger()->error(__VA_ARGS__)
#define YT_CLIENT_WARN(...)		::YOTO::Log::GetClientLogger()->warn(__VA_ARGS__)
#define YT_CLIENT_INFO(...)		::YOTO::Log::GetClientLogger()->info(__VA_ARGS__)
#define YT_CLIENT_TRACE(...)	::YOTO::Log::GetClientLogger()->trace(__VA_ARGS__)
#define YT_CLIENT_FATAL(...)	::YOTO::Log::GetClientLogger()->fatal(__VA_ARGS__)

?log.cpp:

#include "Log.h"namespace YOTO {std::shared_ptr<spdlog::logger> Log::s_CoreLogger;std::shared_ptr<spdlog::logger>  Log::s_ClientLogger;void  Log::Init() {//設(shè)置日志格式spdlog::set_pattern("%^[%T] %n: %v%$");//創(chuàng)建多線程logger,核心logger為YOTOs_CoreLogger = spdlog::stdout_color_mt("YOTO");//設(shè)置打印消息的級別,trace是打印所有東西(篩選器)s_CoreLogger->set_level(spdlog::level::level_enum::trace);//客戶端的為APPs_ClientLogger= spdlog::stdout_color_mt("APP");s_ClientLogger->set_level(spdlog::level::level_enum::trace);}
}

?測試:

在YOTO.h中加入#include "YOTO/Log.h",記得重新生成,把dll加入到Sandbox(后續(xù)會使用premake簡化該流程,這里暫時(shí)手動生成)

我們在入口點(diǎn)修改代碼測試:

#pragma once#ifdef YT_PLATFORM_WINDOWS
#include "../YOTO.h"extern YOTO::Application* YOTO::CreateApplication();
void main(int argc,char** argv) {YOTO::Log::Init();YT_CORE_ERROR("測試警告信息");int test = 1;YT_CLIENT_INFO("測試info:test={0}",test);auto app = YOTO::CreateApplication();app->Run();delete app;
}
#endif

輸出:

Premake配置安裝:

點(diǎn)擊下載:https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip

創(chuàng)建vendor文件夾:文件結(jié)構(gòu)如下

放入聲明文件LICENSE.txt:

Copyright (c) 2003-2016 Jason Perkins and individual contributors.
All rights reserved.Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice,this list of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.3. Neither the name of Premake nor the names of its contributors may beused to endorse or promote products derived from this software withoutspecific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

編寫premake5.lua文件:

workspace "YOTOEngine"		-- sln文件名architecture "x64"	configurations{"Debug","Release","Dist"}-- 組成輸出目錄:Debug-windows-x86_64
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"project "YOTOEngine"		location "YOTOEngine"--在sln所屬文件夾下的Hazel文件夾kind "SharedLib"--dll動態(tài)庫language "C++"targetdir ("bin/" .. outputdir .. "/%{prj.name}") -- 輸出目錄objdir ("bin-int/" .. outputdir .. "/%{prj.name}")-- 中間目錄-- 包含的所有h和cpp文件files{"%{prj.name}/src/**.h","%{prj.name}/src/**.cpp"}-- 包含目錄includedirs{"%{prj.name}/vendor/spdlog-1.x/include"}-- 如果是window系統(tǒng)filter "system:windows"cppdialect "C++17"-- On:代碼生成的運(yùn)行庫選項(xiàng)是MTD,靜態(tài)鏈接MSVCRT.lib庫;-- Off:代碼生成的運(yùn)行庫選項(xiàng)是MDD,動態(tài)鏈接MSVCRT.dll庫;打包后的exe放到另一臺電腦上若無這個(gè)dll會報(bào)錯(cuò)staticruntime "On"	systemversion "latest"	-- windowSDK版本-- 預(yù)處理器定義defines{"YT_PLATFORM_WINDOWS","YT_BUILD_DLL"}-- 編譯好后移動Hazel.dll文件到Sandbox文件夾下postbuildcommands{("{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox")}-- 不同配置下的預(yù)定義不同filter "configurations:Debug"defines "YT_DEBUG"symbols "On"filter "configurations:Release"defines "YT_RELEASE"optimize "On"filter "configurations:Dist"defines "YT_DIST"optimize "On"project "Sandbox"location "Sandbox"kind "ConsoleApp"language "C++"targetdir ("bin/" .. outputdir .. "/%{prj.name}")objdir ("bin-int/" .. outputdir .. "/%{prj.name}")files{"%{prj.name}/src/**.h","%{prj.name}/src/**.cpp"}-- 同樣包含spdlog頭文件includedirs{"YOTOEngine/vendor/spdlog-1.x/include","YOTOEngine/src"}-- 引用YOTOEnginelinks{"YOTOEngine"}filter "system:windows"cppdialect "C++17"staticruntime "On"systemversion "latest"defines{"YT_PLATFORM_WINDOWS"}filter "configurations:Debug"defines "YT_DEBUG"symbols "On"filter "configurations:Release"defines "YT_RELEASE"optimize "On"filter "configurations:Dist"defines "YT_DIST"optimize "On"

創(chuàng)建Generate.bat文件,每次將bin和bin-int刪除然后點(diǎn)這個(gè)文件就可以自動生成。

call vendor\bin\premake\premake5.exe vs2019
PAUSE

?遇到問題不要慌:

這個(gè)問題是還沒創(chuàng)建完就啟動了,只需要等一會兒就好了。

等待10秒鐘之后:啟動!

今天就看到這里,下一集:事件系統(tǒng)【持續(xù)更新中】

http://www.risenshineclean.com/news/47805.html

相關(guān)文章:

  • 網(wǎng)站建設(shè)月總結(jié)怎么做百度關(guān)鍵詞排名
  • 網(wǎng)站首頁的動態(tài)視頻怎么做的公司seo排名優(yōu)化
  • 給網(wǎng)站做插畫分辨率seo也成搜索引擎優(yōu)化
  • 北京網(wǎng)站建設(shè)天下公司網(wǎng)絡(luò)營銷品牌
  • 公司怎么建網(wǎng)站做推廣日本疫情最新數(shù)據(jù)
  • 棗莊三合一網(wǎng)站開發(fā)百度安裝應(yīng)用
  • 實(shí)時(shí)視頻網(wǎng)站怎么做網(wǎng)站百度推廣
  • 新鄉(xiāng)網(wǎng)站開發(fā)的公司電話在線服務(wù)器網(wǎng)站
  • 黃金網(wǎng)站網(wǎng)址免費(fèi)百度網(wǎng)訊科技有限公司官網(wǎng)
  • 做網(wǎng)站好處小程序制作一個(gè)需要多少錢
  • 簡單做網(wǎng)站的價(jià)格網(wǎng)頁設(shè)計(jì)一般用什么軟件
  • 北京網(wǎng)站優(yōu)化排名推廣站長工具網(wǎng)站查詢
  • 個(gè)人適合建什么網(wǎng)站廈門seo關(guān)鍵詞
  • 垡頭做網(wǎng)站的公司2021年網(wǎng)絡(luò)熱點(diǎn)輿論
  • 四川綿陽網(wǎng)站建設(shè)百度認(rèn)證證書
  • 自己做的網(wǎng)站怎么上網(wǎng)百度站長平臺快速收錄
  • 專業(yè)做鞋子網(wǎng)站百度競價(jià)排名是什么
  • 中小學(xué)學(xué)校網(wǎng)站建設(shè)seo入門教程seo入門
  • 便宜的網(wǎng)站設(shè)計(jì)企業(yè)查詢官網(wǎng)入口
  • 遂寧網(wǎng)站開發(fā)廣告軟文小故事800字
  • 做社交網(wǎng)站有哪些全世界足球排名前十位
  • 小程序平臺商城seo搜索引擎優(yōu)化實(shí)戰(zhàn)
  • 建設(shè)企業(yè)網(wǎng)站目的查看域名每日ip訪問量
  • 中工信融營銷型網(wǎng)站建設(shè)百度精準(zhǔn)獲客平臺
  • 做外貿(mào)翻譯用哪個(gè)網(wǎng)站好百度app安裝免費(fèi)下載
  • 南昌淘寶網(wǎng)站制作公司百度競價(jià)排名廣告定價(jià)
  • 建設(shè)網(wǎng)站目的是什么成人用品哪里進(jìn)貨好
  • 正規(guī)的網(wǎng)站建設(shè)企業(yè)網(wǎng)站制作seo手機(jī)搜索快速排名
  • 青島 google seo杭州網(wǎng)站優(yōu)化平臺
  • 時(shí)尚網(wǎng)站首頁設(shè)計(jì)中國國家人事人才培訓(xùn)網(wǎng)證書查詢