gpt4 book ai didi

I need to compile Borland C++ programs in VSCode but I encounter errors(我需要在VSCode中编译Borland C++程序,但遇到错误)

转载 作者:bug小助手 更新时间:2023-10-25 19:18:31 25 4
gpt4 key购买 nike



I need to be able to compile Borland C++ programs in VSCode. At first, I received errors regarding the includes, but I was able to fix them. After that, I started receiving this error:

我需要能够在VSCode中编译Borland C++程序。起初,我收到了有关包含的错误,但我能够修复它们。在那之后,我开始收到这个错误:


Error E2075: Incorrect command line option: -fdiagnostics-color=always. 

Does anyone know what I can do to configure VSCode with Borland C++ and setup all the configuration files?

有人知道我可以做些什么来用Borland C++配置VSCode并设置所有配置文件吗?


Here is my current tasks.json:

以下是我目前的tasks.json:


{
"tasks": [
{
"label": "Build bcc32",
"type": "shell",
"command": "bcc32 demo.cpp",
"args": [

"${workspaceFolder}/*.cpp",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
},
{
"label": "Run",
"type": "shell",
"command": "demo.exe"
}
],
"version": "2.0.0"
}

更多回答

1. Why do you need this? 2. This file doesn't contain -fdiagnostics-color=always, so you're not using it. What do you press to start the build?

1.为什么需要此文件?2.此文件不包含-f诊断-COLOR=ALWAYS,因此您没有使用它。按什么键开始构建?

The company I work at has a very important project that was made in Borland C++, but only a few machines have licenses and they are not always able to access them. So they want a way to debug and run code in VSCode. I either press CTRL+F5 or I go directly to the file and press the Run button

我工作的公司有一个用Borland C++编写的非常重要的项目,但只有几台机器有许可证,他们并不总是能够访问它们。因此,他们需要一种在VSCode中调试和运行代码的方法。我要么按Ctrl+F5,要么直接转到文件并按Run按钮

If it is a very important project it deserves some care and attentention. Or are the CPU's soo old there are no current compilers that support it. I doubt the word "important" here, it means we cannot change it because we have no tests. And you might bypass the licences on borland IDE this way, but you will still be using (possibly unlicenced instances) of the borland compiler.

如果它是一个非常重要的项目,它应该得到一些关注和关注。或者是因为CPU太老了,目前还没有支持它的编译器。我怀疑这里的“重要”一词,它的意思是我们不能改变它,因为我们没有测试。您可以通过这种方式绕过Borland IDE上的许可,但您仍将使用Borland编译器的(可能是未经许可的实例)。

They don't want to change anything and the policy does not allow us to use unlicenced instances unfortunately so I have to do it this way. I thought about using it with Code Blocks if with VsCode I don't find a solution

他们不想改变任何事情,不幸的是,政策不允许我们使用未经许可的实例,所以我不得不这样做。如果使用VsCode我找不到解决方案,我曾考虑将其用于代码块

if you can't get it to work on the command line how do you suppose to get it to work in VSC, you have to emulate what you do on the CL

如果您不能让它在命令行上工作,那么如何让它在VSC中工作,您必须模拟您在CL上所做的事情

优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com