我们在编译程序时,有时需要跟debug和release配置来包含不同的库,可以在pro文件中如下定义:
CONFIG(debug,debug|release) {
LIBS += xxxd.lib
} else {
LIBS += xxx.lib
}
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
2.6k累计阅读
2.7k平均单平台
已同步平台
CSDN
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄17年
我们在编译程序时,有时需要跟debug和release配置来包含不同的库,可以在pro文件中如下定义:
CONFIG(debug,debug|release) {
LIBS += xxxd.lib
} else {
LIBS += xxx.lib
}
VS2022+QT使用VTK教程
配置成功的小伙伴们就可以往下去看如何使用VTK。需要用到的文件,这些文件来源在中。
Debug与Realse下的lib
引用第三方库时,默认引用的lib文件,debug比realse 多一个d 如 debug下 xxxd.lib 在realse下xxx.lib
Visual Studio下程序开发: 编译QT程序Debug正常,Release出错
一、环境介绍 Visual Studio IDE 版本:VS2017 QT版本:QT5.12.6 产生问题环境:在Visual Studio 2017下开发QT程序,编译QT程序发现Debug可以正常编译运行,Release编译出错。 二、问题原因与解决方法 问题原因: Debug模式和Release模式下使用链接的QT是有区别的。 比如, Release模式下使用的库:Qt5AxServer.lib、Qt5AxContainer.lib、Qt5Svg.lib...... ...
qt调试不能进入lib库的源代码中解决方法
构建套件中不要设置sysroot!
终端运行脚本报: 因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fw link/?LinkID=135170 中的 about_Execution_
PowerShell 执行策略是一种安全机制,用于控制哪些脚本可以在系统上运行。默认情况下,Windows 系统会设置较为严格的执行策略,以防止恶意脚本的执行。执行策略有以下几种常见级别:Restricted(限制):不允许运行任何脚本。AllSigned(全部签名):仅允许运行经过数字签名的脚本。RemoteSigned(远程签名):允许运行本地脚本,但远程下载的脚本需要数字签名。Unrestricted(无限制):允许运行所有脚本,但会警告未签名的脚本。
C++实战:基于ONNX Runtime与OpenCV部署XFeat图像匹配模型
本文详细介绍了在C++环境中,利用ONNX Runtime与OpenCV高效部署XFeat图像匹配模型的完整流程。内容涵盖环境搭建、模型转换、核心代码封装及可视化实现,旨在帮助开发者将这一先进的深度学习模型集成到对性能要求苛刻的工业或嵌入式应用中,实现鲁棒且快速的特征匹配。
Qt项目的构建(编译)、运行与调试(三)
Qt项目的构建(编译)、运行与调试
报错:subprocess.CalledProcessError: Command ‘[‘where‘, ‘cl‘]‘ returned non-zero exit status 1.
右键此电脑--属性--高级系统设置--环境变量--系统变量--找到Path。Enterprise是企业版,如果你是社区版就找Community。2.安装的时候,c++桌面那个需要勾选。
Qt——(详细)“项目在Debug构建环境下能运行而在Release构建环境下不能运行”解决方案之一,以及 禁用(黄色)警告
为了完善“Tips”提示功能,我在.h头文件里添加了一个函数/方法先用Debug环境运行正常后,再用Release环境运行一遍,前者正常启动软件,后者却无法正常启动软件,自我摸索一小时左右,解决掉了该问题,在此记录下来,以供大家参考。1、Debug环境下能运行的,Release环境下不一定运行,而Release环境下能运行的,一般Debug能运行,除非有“外部dll库指定Release环境下才可运行”的。
舵机操作手册
微型伺服马达原理与控制(中鸣) 1、微型伺服马达内部结构一个微型伺服马达内部包括了一个小型直流马达;一组变速齿轮组;一个反馈可调电位器;及一块电子控制板。其中,高速转动的直流马达提供了原始动力,带动变速(减速)齿轮组,使之产生高扭力的输出,齿轮组的变速比愈大,伺服马达的输出扭力也愈大,也就是说越能承受更大的重量,但转动的速度也愈低。 2、微行伺服马达的工作原理一个微型伺服马达是一个典型闭环反馈系统,其原理可由下图表示: 减速齿轮组由马达驱动,其终端(输出端)带动一个线性的比例电位器作位置检测,该电位器把
【3d打印】基于Klipper的3d打印远程上位机系统(Qt),klipper源码,通信解析,打印参数设置
基于Klipper的3d打印远程上位机系统(Qt),klipper源码,通信解析,打印参数设置(启庞Kp3s V1)
QT pro文件解析
例如在Windows和Linux的动态库文件格式是不一样的,一个是lib文件一个是so文件:win32:LIBS+= ./mitab/mitab_i.lib unix:LiBS+= ./mitab/libmitab.so。如:DESTDIR = ../bin/ 则目标文件的路径为当前pro文件所在目录的上一级的bin目录下。HEADERS:工程所需要的头文件,一般包括用户自定义的头文件或未放入系统头文件路径的头文件。LIBS += -L folderPath //引入的lib文件的路径 -L:引入路径。
基于ZYNQ的HP总线与DDR交互:实现PL与PS高效数据传输的完整指南
本文将深入探讨如何通过AXI HP总线实现PL与PS的DDR交互,结合代码示例、硬件配置与创新优化,助力开发者掌握这一关键技术。ZYNQ内部通过AXI HP接口直接连接PL与DDR控制器,PL通过AXI协议发送读写请求,绕过PS的CPU直接操作DDR。通过AXI HP总线实现PL与PS的DDR交互,开发者可充分发挥ZYNQ异构架构的优势。在Xilinx ZYNQ系列芯片中,PS(Processing System)与PL(Programmable Logic)的协同设计是其核心优势。
【QT加载静态链接库(.Lib,.a,.os),以及关于LIBS +=的用法】
QT加载静态链接库(.Lib,.a),以及关于LIBS +=的用法.pro 文件中写入LIBS
PCL 提取两片点云的非重叠部分【2025最新版】
PCL 提取两片点云的非重叠部分。博客长期更新,本文最近一次更新时间为:2025年9月1日。
YOLOv11目标检测模型性能评价指标详解,涉及混淆矩阵、F1-Score、IoU、mAP、参数量、计算量等,一文打尽所有评价指标
本文主要讲解的是计算机视觉网络模型的性能评价指标,这是每一篇论文中都需要展示的内容。熟悉每一个评价指标也能够帮助我们在训练和改进模型过程中,更好的观察模型的变化效果。
QT中Debug与Release版本载入不同动态库
win32:CONFIG(release, debug|release): { LIBS +=$$PWD/../../../thirdparty\qwt\lib\qwt.lib LIBS +=$$PWD/../../../thirdparty\xlsx\lib\Qt5Xlsx.lib } else:win32:CONFIG(debug, debug|release): { LIBS +=$$PW...
假人有限元模型
假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用
【Qt问题记录2】QVTKWidget在Debug下无法运行
困扰了很久的问题,自从Qt+pcl+vtk环境搭建起来后,虽然在release下能够运行,但是调试效率真的太低了,只能靠肉眼以及qDebug定位问题,实在是事倍功半,不过好在release能够直接打包,项目也刚好交出去,这次打算彻底解决这个问题,程序报错如下: 在网上搜集的多方资料,大部分的原因如下:1)搭建环境时没有区分DEBUG与RELEASE的lib文件2)环境变量没设置好3)Debug下和Release的dll动态库混用 上述问题本人均一一尝试过,首先是搭建环境时没有区分lib
SAP B1中文培訓教材_SDK
公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说
大中型超市收银系统(可直接运行)
光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开
qt vs release模式下编译的程序,运行时却需要debug版本的依赖
使用windeployqt 打包应该是没问题的,我感觉应该是我的项目配置出了问题,后来查看项目属性,发现 连接器--》输入--》附加依赖项 这里面引入的lib库居然是Debug版本的的,release应该引用release版本的lib库,这里搞错了,估计是拷贝的debug的配置信息,忘记改了,修改之后,重新编译,重新打包QT程序,问题解决。
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
vs2010开发qt程序debug正常,release出错
在debug模式下,配置的动态链接库是qtmaind.lib;QtGuid4.lib;QtCored4.lib; 这些链接库,在release模式下是不适用的,进入到qt的目录下,发现了有一些不带d的链接库。 于是,把上面三个qtmaind.lib;QtGuid4.lib;QtCored4.lib;链接库,改为qtmaind.lib;QtGui4.lib;QtCore4.lib; 重新编译,
OSG QT 完整附加依赖项(.lib)
OSG QT 完整附加依赖项(.lib) ** 可在VS等需要添加附加依赖项的环境使用******* 注:OSG版本:3.6.4;QT版本:5.9.8** 带d的为debug,不带d的release 省掉了Qt5AxServer.lib和Qt5AxServerd.lib,因为这两个会在VS调试中报错 osgViewer.lib osgText.lib osgGA.lib osgDB.lib o...
debug下运行出现无法打开Qt5Widgetsd.lib
无法打开QtWidgetsd.lib
关于release和debug版本不能混用的教训
之前改老师写好的MFC的一个图像类的lib库,重新生成之后,调用lib的项目一直报错。错误如下: 大致就是检测到lib文件里各种.obj不匹配。 找了蛮久问题,后来发现是版本不兼容的问题。 vs中的工程有debug和release两个版本,我的lib库项目用debug版本编译,调用的项目是用release版本编译的。 需要强调一下: 静态链接库的生成与使用需要用相同版本。 为什...
qt vs release模式下编译的库,运行时却需要debug版本的依赖
如图所示: 依赖Qt5core.dll为正常现象,但它居然还需要依赖Qt5Widgetsd.dll,这个很明显是debug下的库,网上搜索很多的方法,比如给vs添加忽略特定库: 没有效果,最后在vcxproj文件里发现 一大堆release的库里出现一个debug的库很违和,改成Qt5Widgets.dll,编译成功,在用depend工具测试如下图所示: 问题解决。 最后记录下,修改vcxproj文件里的那个属性,貌似就是修改了附加依赖项,有同样错误的可以试试看,我这里还没有尝试。 ...
QT 添加 lib库
QT 添加 lib库 扒自网友文章: 一.添加第三方的头文件 首先,添加头文件 #include "ControlCAN.h" 然后,再将这个头文件放到工程的目录下 二.添加.lib文件 首先,将.lib文件放到对应的工程目录下(当然,放到其他路径也可以)。 但是,仅仅做这一步是不行的,工程不会主动去包含这个.lib文件,你必须告诉他,lib文件在哪里,才可以。 所以,我们要做...
Qt 工程 pro文件
工作中,感觉pro文件的有些内容真不太懂,现系统性的学习一下。于此备录,分享共勉。 为了更好的理解,先创建一个简单的工程作为实践。 【1】创建一个pro文件 1.1 新建proDemo工程。步骤如下:Qt Creator--->New Project--->应用程序--->Qt Widgets Application--->名称为:proDemo(创建路径自己拟定,本地为F:\Source\proStudy)--->类信息保持不变--->完成 1.2 提取pro文
✦幸运刮刮乐✦
刮开赢 惊喜好礼
— 惊喜奖品抢先看 —

被折叠的 条评论
为什么被折叠?



