当前位置: 首页 > news >正文

制作网站公司哪里好东莞通充值

制作网站公司哪里好,东莞通充值,网站解决方案模板,如何破解wordpress文章目录问题includesourceout配置过程遇到的问题与解决遇到的问题1解决步骤1. ctrl shift p2. 配置json文件修改task.json文件修改launch.json可能遇到的错误1. collect2: error: ld returned 1 exit status2. /mnt/d/tmp/c/source/add.cpp:3:10: fatal error: add.h: No su… 文章目录问题includesourceout配置过程遇到的问题与解决遇到的问题1解决步骤1. ctrl shift p2. 配置json文件修改task.json文件修改launch.json可能遇到的错误1. collect2: error: ld returned 1 exit status2. /mnt/d/tmp/c/source/add.cpp:3:10: fatal error: add.h: No such file or directoryc_cpp_properties.json问题 如下图文件夹 include: *.h文件out: 编译后的输出文件夹source*.cpp文件先看看我们的几个文件夹里有什么文件还有文件里有什么内容。 include add.h 这里就是add()函数的声明还需要要加上 int test_add();这个声明 source main.cpp 简单的一个程序入口 add.cpp 这里是我们主要的程序部分定义了几个add()函数。还有test_add()函数还需要#include “add.h” out 现在还没有编译过所以为空 那我们要怎样配置vscode里的一些环境呢 配置过程遇到的问题与解决 遇到的问题1 identifier test_add is undefinedC/C(20)说白了就是test_add这个标识符不能识别没有定义可我们从上面的文件里看到了该函数都是有的。再往下看我们一个一个来解决。 解决步骤 1. ctrl shift p 然后选择如下箭头所指示 出现如下选择Debug Anyway 完成这一步了我们可以参文件下面会有一个.vscode的文件夹还有两个.json的文件。 2. 配置json文件 修改task.json文件 默认的如下主要要修改三个地方 添加 -I及-I对应的文件夹 (include)修改 -o及-o对文件夹 (out)修改-g及-g对应的文件(source) {tasks: [{type: cppbuild,label: C/C: g build active file,command: /usr/bin/g,args: [-g,${file},-o,${fileDirname}/${fileBasenameNoExtension}],options: {cwd: ${fileDirname}},problemMatcher: [$gcc],group: {kind: build,isDefault: true},detail: Task generated by Debugger.}],version: 2.0.0 }修改如下 {tasks: [{type: cppbuild,label: C/C: g build active file,command: /usr/bin/g,args: [-g,${workspaceFolder}/source/*.cpp, //all cpp from source-I, //include${workspaceFolder}/include, //include path-o,${workspaceFolder}/out/${fileBasenameNoExtension} //out path],options: {cwd: ${fileDirname}},problemMatcher: [$gcc],group: {kind: build,isDefault: true},detail: Task generated by Debugger.}],version: 2.0.0 }修改launch.json 默认的launch.json如下 只需要修改2版主即可 “program” 后的属性修改成与tasks.json -o 后的属性一样“cwd”: 属性修改为 “${workspaceFolder}/out” {// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid830387version: 0.2.0,configurations: [{name: g - Build and debug active file,type: cppdbg,request: launch,program: ${fileDirname}/${fileBasenameNoExtension},args: [],stopAtEntry: false,cwd: ${fileDirname},environment: [],externalConsole: false,MIMode: gdb,setupCommands: [{description: Enable pretty-printing for gdb,text: -enable-pretty-printing,ignoreFailures: true}],preLaunchTask: C/C: g build active file,miDebuggerPath: /usr/bin/gdb}] }修改如下都已经加注释了 {// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid830387version: 0.2.0,configurations: [{name: g - Build and debug active file,type: cppdbg,request: launch,program: ${workspaceFolder}/out/${fileBasenameNoExtension}, //program output name, same as tasks.json -o pathargs: [],stopAtEntry: false,cwd: ${workspaceFolder}/out, //out here is the folder named outenvironment: [],externalConsole: false,MIMode: gdb,setupCommands: [{description: Enable pretty-printing for gdb,text: -enable-pretty-printing,ignoreFailures: true}],preLaunchTask: C/C: g build active file,miDebuggerPath: /usr/bin/gdb}] }保存以上文件后已经不报错了 F5: 调试程序CTRLF5运行程序ctrl shift B (build) 可能遇到的错误 1. collect2: error: ld returned 1 exit status /usr/bin/g -g /mnt/d/tmp/c/source/main.cpp -I /mnt/d/tmp/c/include -o /mnt/d/tmp/c/out/main /tmp/ccBwxewk.o: In function main: /mnt/d/tmp/c/source/main.cpp:8: undefined reference to test_add() collect2: error: ld returned 1 exit statustasks.json -g 后面的参数改为 “${workspaceFolder}/source/*.cpp” 2. /mnt/d/tmp/c/source/add.cpp:3:10: fatal error: add.h: No such file or directory Starting build... /usr/bin/g -g /mnt/d/tmp/c/source/*.cpp -o /mnt/d/tmp/c/out/main /mnt/d/tmp/c/source/add.cpp:3:10: fatal error: add.h: No such file or directory#include add.h^~~~~~~ compilation terminated. /mnt/d/tmp/c/source/main.cpp:2:10: fatal error: add.h: No such file or directory#include add.h^~~~~~~ compilation terminated.Build finished with error(s). The terminal process failed to launch (exit code: -1).tasks.json 加上-I, “${workspaceFolder}/include”, c_cpp_properties.json c_cpp_properties.json配置文件默认是不会产生的ctrlshiftp 再输入configuration选择后便会出现。 在这里我们可以设置 includePath {configurations: [{name: Linux,includePath: [${workspaceFolder}/**,${workspaceFolder}/include/** //your include path],defines: [],compilerPath: /usr/bin/gcc,cStandard: gnu11,cppStandard: gnu14,intelliSenseMode: linux-gcc-x64}],version: 4 }注请注意这里使用是的WSL环境下的g。
http://wiki.neutronadmin.com/news/200792/

相关文章:

  • 东莞建站模板公司做网站合同范本
  • 网站设计分析案例网站备案要拍照大家怎么做的啊
  • 网站遭受攻击professional wordpress
  • 网站icp备案查询截图机加工如何用网站开发客户
  • 贵阳网站设计方案wordpress怎么关注站点
  • 烟台做网站打电话话术做自媒体哪个平台最好
  • 建设银行培训网站公司主页填什么
  • 河南网站建设价格与方案工商营业执照查询官网
  • 山东省水利建设市场信用信息平台网站wordpress手机适配模板中文
  • com域名注册1元关键词优化精灵
  • 网站用户需求报告外包公司是做什么的
  • wordpress 工具栏图标做搜狗手机网站优化软
  • 东莞网站网站建设养老院网站建设方案
  • 呼和浩特网站seo优化方案重庆建设工程造价信息网官网查询
  • 专业长春网站建设工作室如何使用dw制作网页
  • 地方门户网站用户宣传展示型网站设计
  • 免费生成网站的app校园推广公司
  • 做网站需要空间网站开发毕设开题报告怎么写
  • wordpress粘贴媒体库优化网站技术
  • 酒店 手机网站模板绍兴网站推广优化
  • 专门做旅游攻略的网站人力资源外包平台
  • 做棋牌网站犯法吗怎样自己做刷赞网站
  • 成都建设银行网站江苏网站建设效果好
  • 山东省青州市建设局网站wordpress 首页分页
  • 中学加强校园网站建设wordpress主动推送到Google
  • 域名注册最好的网站网站建设多久能学会
  • 做外卖网站的模板新手做网站怎么上传系统
  • 字体设计在线转换器seo网站优化流程
  • 网站排名大全网络优化是做什么的
  • 保险网站查询网站建设公司问答营销案例