error LNK2001 unresolved external symbol "public virtual void __thiscall
I created a factory pattern today, and defined two inherited functions in the middle, but I didn’t write content in the main function, directly writing the algorithm in the inherited function. As a result, the error error LNK2001: unresolved external symbol "public: virtual void __thiscall was reported. Various search engines could not solve the error. Finally, I thought it should be an error caused by the undefined function in the parent function. The problem was solved after adding the...
error LNK2001 无法解析的外部符号 “public virtual void __thiscall
今天创建了一个工厂模式,中间定义了两个继承函数,但是在主函数中我没有写内容,直接在继承函数中写的算法,结果报错error LNK2001: 无法解析的外部符号 "public: virtual void __thiscall ,各种搜索引擎也没有解决错误,最后觉得应该是父函数中函数未定义造成的错误,加上函数定义之后解决问题。 这个是很低级的错误,估计只有像我这种直接c++写代码的才会出现的错误,记录一下当做提醒,防止以后再犯相同的错误。 code: 123456789101112131415161718192021222324252627library.hclass rElement{public: virtual void getValue(sqlite3_stmt* stmt);private: virtual void setMapValue();protected: map<string , int > sql_map_str;};class beamElement:public rElement{pu...
CLion Debugger process finished with exit code -1073741819
An error occurred while reading sqlite3 data. After ruling out code issues, I felt the problem was with the toolchain, so I changed the Debug Setting from QT-MINGW to MINGW, but it still reported an error. Later, I found a reply in the jetbrains website solutions stating it was a MinGW bug, which was resolved after changing to vs debugger. Original address:Debugger process finished with exit code -1073741819 (0xC0000005)
CLion Debugger process finished with exit code -1073741819
读取sqlite3数据时报错,排除代码问题后感觉实在toolbain上,于是修改Debug Setting从QT-MINGW到MINGW还是报错,后来在jetbrains的网站解决方案中发现回复是MinGW的bug更换vs debugger后解决。 原文地址:Debugger process finished with exit code -1073741819 (0xC0000005)
Method to Insert Multiple Images Consecutively in NPOI, and Partial Style Code
Because the project requirement needs to import two images in the same cell, relying on the methods of the following two linksNPOI export multiple images to Excelc# Use NPOI to Excel Application 3 (Insert Picture)The main body of the code above is the same, but inserting multiple images needs to be in the same patriarch. The blog post mentioned above mentioned that for loop cannot be used, so I created two fixed image paths directly for the first time and found that the creation failed. Then ...
NPOI 连续插入多张图片的办法,及部分样式的代码
因为项目要求需要在同一个单元格导入两张图片,依据了下面两个链接的办法NPOI导出多张图片到Excelc# 使用NPOI向Excel中的应用三(插入图片 )上面代码的主体是一样的,只不过插入多张图片需要在同一个patriarch中,上面博文提到过不能使用for循环,所以我第一次直接将固定的两个图片路径创建,发现创建失败,于是把他放到for循环里面发现可以创建,或许是一个bug又或是我参数赋值错误。 这是主要的代码,我采用for循环创建,一起创建可以参照博客2的内容。但是还要依据一个Sheet只能有一个patriarch,在循环上就新建一个备用 12345byte[] bytes = File.ReadAllBytes(rePath); int pictureIdx = _workbook.AddPicture(bytes, PictureType.JPEG); HSSFClientAnchor anchor = new HSSFClientAnchor(0 +...
Winform DataGridView Binding Resource Then Setting Row Height and Fill Image Setting
I bound resources of datagridview through datasource, adding rows in background by traversing dataTable, because there are images so need to modify column width and row height, but modifying several properties in property interface cannot intervene this action, after troubleshooting found, directly modify inside class adding Row works. Below is code: 123var dateRow = new DataGridViewRow(); dateRow.Height = 150; dateRow.CreateCells(this.dataGridView1); Image fill Colu...
Winform DataGridView 绑定资源后设置行高与布满图片的设置
我通过datasource绑定了datagridview的资源,通过遍历dataTable后台增加行,因为有图片所以需要修改列宽与行高,但是修改属性界面中的几个属性都无法干预这个动作,排查后发现,直接在增加Row的类里面修改即可。下面是code: 123var dateRow = new DataGridViewRow(); dateRow.Height = 150; dateRow.CreateCells(this.dataGridView1); 图片布满ColumnItem在属性里面将Normal修改为Zoom即可
CLion 2021.3 + QT 5.14.2 Configuration
Reference Links: QT Projects Qt. Copying file error while trying to run the project. How to fix a mistake and why is it happening? InstallationInstall CLion and QT before configuration. Download links can be found online, or download directly from their official websites. Configuration2.1 Open CLion and create a project 2.2 After creating, click File->Setting->Build,Execution,Deployment->ToolChains configuration file. We need to replace the environment and C Compiler with MinGW...
CLion 2021.3 + QT 5.14.2 配置
参考链接: QT Projects Qt. Copying file error while trying to run the project. How to fix a mistake and why is it happening? 安装在配置之前首先安装CLion和QT,相应下载链接网上都有,直接官网下载即可 配置2.1 打开CLion创建项目2.2 创建好之后点击File->Setting->Build,Exexution,Deployment->ToolChains配置文件,我们需要把里面的环境和C Compiler替换成QT自带的MinGW,配置如图。 2.3 此时配置完成后还需要配置Debug,点击2.2下方的CMake,配置Debug,在CMakeOption中输入-DCMAKE_PREFIX_PATH=E:\Qt\5.14.2\mingw73_64\lib\cmake,点击Apply之后会发现右上角能够进行Debug,此时我们需要再把CLion与QT Designwe链接,此时需要设置ExternalTool,点击File->...
Teigha 4.0 Net Development Record
Because doing more Revit secondary development, was a bit confused when getting Teigha. After reading examples still felt half-understood. Reason is not very clear about underlying logic of AutoCad, including hierarchical relationship between view and layout, relationship between block and view etc. Reading code is somewhat tiring. Below use a case to talk about knowledge points organized yesterday. teigha itself is Cad sub-item under ODA. Those in need can download from ODA official website...
Teigha 4.0 Net 开发记录
因为做Revit的二次开发多一点,拿到Teigha的时候还有点懵,看完样例还是觉得一知半解的,原因还是对于AutoCad的底层逻辑不是很明白,包括视图与布局之间的层级关系,块与视图的关系等等,看代码会有些累。 下面通过一个案例说一下昨天一天整理的知识点。 teigha本身是ODA下面的Cad分项,有需要的可以去ODA官网下载或是从CSDN的链接下载。刚申请完会有一段时间的试用期,这个时间可以和ODA邮件沟通。 Teigha本身沿用AutoCad的逻辑,如果和我一样有Revit或是其他Autodesk家的开发经验有一些还是比较容易理解的,比如事务(transation) CAD中模型视图(Model Space),布局1(Paper_Space),布局2(Paper_Space),各种块(Block)<其实各种块在CAD中看作一个视图,我们在遍历模型视图内构件时,块的类定义为’BlockReference’从名称上可以看出这是一个引用>,昨天我一直在尝试在BlockReference中获取快内部构件信息,但是一直没有头绪,后来打开CAD点击-编辑块功能,发现他与视图这...
Issue with C++ remove_if causing data duplication
When using remove_if, I found that this function cannot delete data in the container that satisfies the pred expression. remove_if will use other data in the list to fill, while the size itself remains unchanged. For specific explanation, refer to Usage of remove_if. In this case, you need to use the erase method to completely delete it. 12bool IsMoreThen(LinkList target){return target.count>=5;}list.erase(std::remove_if(list.begin(), list.end(), IsMoreThen)); ReasonThe remove_i...
c++ 单独使用remove_if造成数据重复的问题
在使用remove_if时发现此函数无法对容器内满足pred表达式的数据删除,remove_if将会使用列表内其他数据填充,而本身的大小不变,具体解释可以参考remove_if的用法,这种情况下需要搭配erase方法彻底删除. 12bool IsMoreThen(LinkList target){return target.count>=5;}list.erase(std::remove_if(list.begin(), list.end(), IsMoreThen)); 原因remove_if方法是找出符合条件的元素,并使用erase删除返回的vector<_type_>::iterator 的值,并将元素跳转向下一个元素,此时由于元素指针自动跳转+1,会造成连续值删除出现漏删的情况,针对这种情况需要写一个方法重新计算即可。 1234567891011std::vector<LinkList> RemovePredList(std::vector<LinkList> lists){ std::vec...
C++ 没有找到接受const _Ty类型的左操作数的运算符
在使用STL中的count(const )算法时报错没有找到接受const _Ty类型的左操作数的运算符,原因是 使用自己创建的双向链表类没有重载左运算符== ,添加上重载运算即可。
C++ operator not found which takes a left operand of type 'const _Ty'
When using the count(const) algorithm in STL, an error operator not found which takes a left operand of type 'const _Ty' occurred.The reason is that the custom doubly linked list class did not overload the left operator ==. Adding the overload operation fixes it.
ListView IsMouseOver Create Mouse Hover Selectable Effect
12345678910<ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Black"></Setter> <Setter Property="IsSelected" Value="True">...
ListView IsMouseOver 创建鼠标悬停即可选中的效果
12345678910<ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Black"></Setter> <Setter Property="IsSelected" Value="True">...
WPF WrapPanel IsMouseOver 控制Visibility控件不停闪烁
搜索问题,发现答案都是如果使控件闪烁的答案,最后去stackflow找答案,如果希望鼠标进入就显示控件,可以使用Opacity属性控制显隐。 code: 1234567891011121314151617181920<WrapPanel.Resources> <Style x:Key="WrapPanelStyle" TargetType="WrapPanel"> <Style.Setters> <Setter Property="Opacity" Value="0"></Setter> ...
WPF WrapPanel IsMouseOver Controlling Visibility Causes Flicker
Searching for the problem, found answers were mostly about how to make controls flicker. Finally went to stackflow to find the answer. If you want the control to show when the mouse enters, you can use the Opacity property to control visibility. code: 1234567891011121314151617181920<WrapPanel.Resources> <Style x:Key="WrapPanelStyle" TargetType="WrapPanel"> <Styl...





