草庐IT

member_no

全部标签

c++ - Netbeans远程C++开发 "No rule to make target"错误

在Netbeans中创建一个简单的远程C++开发应用程序时,出现以下错误:gmake[2]:Enteringdirectory'/path/to/project'gmake[2]:***Noruletomaketarget'/path/to/project/cpp/file'gmake[2]:Leavingdirectory'/path/to/project'BUILDFAILED(exitvalue2,totaltime:1s)要重现此错误,我只需创建一个新的C/C++项目,选择一个我已经配置的远程主机。当我添加具有相应.h文件的.ccp文件时,出现此错误。我什至不必使用或包含这些文

c++ - 智能感知 : namespace "MSXML2" has no member "DOMDocument" in VS2012

我正在尝试编译我继承的项目,然后遇到了这个错误。以下是一些相关代码:#include...HRESULThr;hr=pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument));有人可以帮忙吗? 最佳答案 我在Windows8中看到了类似的问题。似乎MSXML6.0没有公开DOMDocument,但它确实公开了DOMDocument60。为了帮助其他人通过搜索到达这里,您可能还会看到的编译器错误是:错误C2039:“DOMDocument”:不是“MSXML2”的成员尝试进行以下更改以明确使用

c++ - 谷歌模拟 : "no appropriate default constructor available"?

将VisualStudio2010C++与googlemock结合使用。我正在尝试使用我创建的模拟,但在线上遇到编译器错误:EmployeeFakeemployeeStub;错误是:1>c:\someclasstests.cpp(22):errorC2512:'MyNamespace::EmployeeFake':noappropriatedefaultconstructoravailable假员工:classEmployeeFake:publicEmployee{public:MOCK_CONST_METHOD0(GetSalary,double());}员工:classEmploy

c++ - vector 迭代器 : no match for ‘operator=’

考虑到下面第一个代码片段中的C++代码,我得到了第二个代码片段中指示的编译错误。看起来我在遍历vector实例时做错了。你能告诉我如何克服这些编译问题吗?谢谢。代码中标记了LINE171。片段1(代码)#include#include#includeclassVipAddressSetEntity:BaseEntity{public:VipAddressSetEntity():BaseEntity(){}VipAddressSetEntity(std::string&uuid,std::string&name):BaseEntity(uuid,name){}VipAddressSetE

c++ - 如何在函数声明中声明 C++ mem_fn(member_function)?

我理解在其类之外传递成员函数地址的基本问题。我觉得mem_fn()可能是解决方案,但我在具体细节上遇到了麻烦。我在类p中有一个成员函数,当前声明为typedefvoid(*valNamedFlagsCallback)(constint,constbool);boolvalNamedFlags(constOptBlk*operand,constchar*description_of_value_or_NULL,constintsubscripts[],constchar*names[],valNamedFlagsCallbackcallBack);在e类中,我试图用调用valNamedF

c++ - 解决 "only static const integral data members can be initialized within a class"编译错误

以下创建全局对象会导致编译错误。#include"stdafx.h"#includeusingnamespaceSystem;usingnamespacestd;#pragmahdrstopclassTester;voidinput();classTester{staticintnumber=5;public:Tester(){};~Tester(){};voidsetNumber(intnewNumber){number=newNumber;}intgetNumber(){returnnumber;}}TestertesterObject;voidmain(void){cout>ne

c++ - Q_PROPERTY : MEMBER vs READ/WRITE

我正在阅读有关Q_PROPERTY宏的Qt5.5文档,但我无法很好地理解它。我知道您可以在此宏中使用关键字MEMBER或访问器READ/WRITE。如果您使用关键字MEMBER,则不必编写访问器,因为您可以使用setProperty()和Property()访问您的私有(private)数据成员(属性),如set和get。关键是:使用MEMBER和使用READ/WRITE有什么区别吗?什么时候应该使用一种方式,什么时候使用另一种方式?如有必要:使用MEMBER的例子:Q_PROPERTY(QStringtextMEMBERm_textNOTIFYtextChanged)使用读/写的例子

c++ - "No rule to make target ' 安装 '"... 但是 Makefile 存在

我在安装C++库时遇到问题。CMake命令成功并生成Makefile,但它给出警告:CMakeWarning(dev)atCMakeLists.txt:27(LINK_DIRECTORIES):Thiscommandspecifiestherelativepath../usr/local/libasalinkdirectory.PolicyCMP0015isnotset:link_directories()treatspathsrelativetothesourcedir.Run"cmake--help-policyCMP0015"forpolicydetails.Usethecmak

c++ - 此函数或变量可能不安全。要禁用弃用,请使用 _CRT_SECURE_NO_WARNINGS

我正在处理C++DDL,但是我在某些地方遇到了以下问题:C4996'sprintf':Thisfunctionorvariablemaybeunsafe.Considerusingsprintf_sinstead.Todisabledeprecation,use_CRT_SECURE_NO_WARNINGS.Seeonlinehelpfordetails.我确实尝试了#define_CRT_SECURE_NO_WARNINGS,但问题仍然存在。这是代码:sprintf(szDebugString,"%s:0x%x(%s%s%i)",ptrName,(DWORD)funcPtr,inte

STM32CubeMX-Keil MDK报错error: L6236E: No section matches selector - no section to be FIRST/LAST.

1.报错过程学习正点原子HAL库开发教学视频时跟随操作出现,对应如下链接视频P35。【【正点原子】手把手教你学STM32HAL库开发全集【真人出镜】STM32入门教学视频教程单片机嵌入式】第35讲基础篇-新建STM32CubeMX工程步骤_哔哩哔哩_bilibili软件版本:STM32CubeMX6.3.0KeilMDK5.362.报错原因error:L6236E:Nosectionmatchesselector-nosectiontobeFIRST/LAST.翻译:错误:L6236E:没有节与选择器匹配-没有节是第一个/最后一个。这是在编译时发现的Error,其实使用STM32CubeMX生