草庐IT

cpp-core-guidelines

全部标签

c++ - 如何在 Jenkins 上构建 Cpp 代码?

我正在Jenkins中执行一个批处理文件来构建一个cpp代码,我在两者之间有一个命令来构建可执行文件,如“g++sourcefile.cpp-oexecutablefile”,它给出了错误'g++'isnotrecognizedasaninternal或外部命令。如何解决这个问题?? 最佳答案 当Jenkins在Windows机器上作为服务运行时,它在系统帐户下运行,而不是用户帐户(或您的帐户)。因此,您需要确保为系统帐户设置路径(等)所需的一切,或者作为Jenkins中“Windows批处理脚本”的一部分包含在内。(实际上我自己在

c++ - 如何在Windows上构建Botan合并文件botan_all.cpp和.h

正如标题所建议的那样,我尝试制作botan_all文件以将botan直接集成到我的项目中。我在我的Windows上安装了python并在控制台中运行以下命令:C:\Temp\Botan-1.11.16>configure.py--cc=msvc--single-amalgamation-file这导致以下输出:INFO:Platform:OS="Windows"machine="AMD64"proc="Intel64Family6Model58Stepping9,GenuineIntel"INFO:GuessingtargetOSiswindows(use--ostoset)INFO:

windows - Windows 中的 core.autocrlf 在哪里设置?

我在Windows7中安装了git2.6.2。我将core.autocrlf设置为False。我想知道该设置来自哪里。我有以下奇怪的行为:>cdc:\>gitconfig--global--list|select-stringautocrlf>gitconfig--system--list|select-stringautocrlffatal:unabletoreadconfigfile'C:\ProgramFiles\Git\mingw64/etc/gitconfig':Nosuchfileordirectory>gitconfig--list|select-stringautocr

c# - Windows 10 IoT Core - 视频打开关闭

我一直在运行Windows10IoT核心版的RaspberryPi2中开展项目。项目对象传感器通过打开视频触发。但是我收到以下错误:Anexceptionoftype'System.Exception'occurredinProjeVol1.exebutwasnothandledinusercodeAdditionalinformation:Theapplicationcalledaninterfacethatwasmarshalledforadifferentthread.(ExceptionfromHRESULT:0x8001010E(RPC_E_WRONG_THREAD))代码:

windows - LuaSocket 套接字/core.dll 需要的位置?

当我使用localsocket=require("socket.core")它工作正常,dll位于“dir/socket/core.dll”但是当我将dll移动到say时“dir/folder/core.dll”并使用localsocket=require("folder.core.")它返回已找到,但无法在folder.core中找到特定模块。我如何在socket.core要求之外使用Luasocket?谢谢! 最佳答案 如果您想要require("socket.core"),共享库(dll)必须有一个名为luaopen_sock

.net - .NET 与 .NET Core 2 的不同 P/Invoke 入口点

我正在将一些代码从.NET(4.5)移动到.NETCore(2),并且有一个像这样的多目标项目...net45;netcoreapp2.0代码库使用来自kernel32的Win32API函数CopyMemory,但我发现我需要根据我的目标框架使用不同的入口点名称。#ifNET45[DllImport("kernel32.dll",EntryPoint="CopyMemory",SetLastError=false)]#else[DllImport("kernel32.dll",EntryPoint="RtlCopyMemory",SetLastError=false)]#endifpu

c++ - 为什么 CPP 中 WaitForSingleObject 函数的这两种不同行为

我有以下代码示例:#include#include#includeusingnamespacestd;voidmain(){SHELLEXECUTEINFOShExecInfo={0};ShExecInfo.cbSize=sizeof(SHELLEXECUTEINFO);ShExecInfo.fMask=SEE_MASK_NOCLOSEPROCESS;ShExecInfo.hwnd=NULL;ShExecInfo.lpVerb=NULL;ShExecInfo.lpFile="cmd.exe";ShExecInfo.lpParameters="";ShExecInfo.lpDirecto

c# - 在 .Net 3.5 中使用 Ninject 时 System.Core 的 System.Io.FileNotFoundException

我将Ninject(v3.2.2.0)与基于.net3.5框架构建的工具一起使用。这一直很好-直到几周前我搁置开发。我再次拿起它为发布做准备,但它不再正常-它仍然可以毫无问题地编译,但现在每当我尝试运行它时都会收到FileNotFoundException:System.IO.FileNotFoundExceptionoccurredMessage=Couldnotloadfileorassembly'System.Core,Version=2.0.5.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e'oroneofitsdepende

c++ - 输入层类型 : ImageData in windows caffe cpp giving Blank Output

我正在使用cpp在Windows中使用caffe处理图像分割问题。我正在使用“Imagedata”输入类型来训练网络,但在测试时我得到的是空白输出。谁能帮我分析一下这个问题。**********solver.prototxt***************test_initialization:falsebase_lr:0.01display:51max_iter:50000lr_policy:"step"gamma:0.1momentum:0.9weight_decay:0.0001stepsize:4069snapshot:10000snapshot_prefix:"snapshot

python - cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'

我在windows10CMD中遇到了一个问题,当我尝试为coco数据集编译一个.py文件时,问题就出现了。信息如下:runningbuild_extbuilding'pycocotools._mask'extensionC:\ProgramFiles(x86)\MicrosoftVisualStudio14.0\VC\BIN\amd64\cl.exe/c/nologo/Ox/MD/W3/GS-/DNDEBUG-IE:\Anaconda2\Lib\site-packages\numpy\core\include-I../common-IE:\Anaconda2\include-IE:\A