Tag Archives: IDE

DevC++ Error: [Error] Id returned 1 exit status [How to Solve]

DEVC + + reports an error [error] ID returned 1 exit status

Cause

The computer in the school computer room always compiles twice and always reports errors

Error reporting prompt

[Error] Id returned 1 exit status

Solution

Premises

First check whether the console window of your program is closed, and then recompile if there is an error. The following scheme is for the case where an error is still reported after closing the window.

Operation

Right click dev C + + icon -> Properties – > Compatibility > Check “run this program as an administrator” open dev C + + –> tools –> compilation options –> code generation/Optimization –> connector –> set “link objective C program” to yes, and switch the compiler in the upper right corner of the dev C + + main page to debug mode (for example, tdm-gcc 4.9.2 64 bit debug) If your computer has a restore card, please place the project and its files on an unprotected disk.

S32ds: error in services launch sequence when debugging with JLINK

S32ds uses JLINK debugging to report an error: error in services launch sequence

1、 Solution

    the operation is shown below

    2、 Scenario:

    Create a new example project and connect JLINK to SWD. Select XXX_ debug_ flash_ JLINK option for debugging. The error interface pops up, as shown in the figure below

    3、 Solving process

    Use JLINK to connect MCU. Segger’s SWD is connected to the MCU, the red light flashes, and the interface prompts that the connection is successful. Click the debugging button of s32ds, and the JLINK light does not flash. It is suspected that the correlation between s32ds and segger is abnormal, so the path is found and the solution is obtained

Error: Your CLT does not support macOS 11.6 [How to Solve]

After upgrading MacOS to MacOS Big Sur, we will encounter an error: your CLT does not support MacOS 11.6. When installing or updating software with brew , we just need to reinstall Xcode select
solution:
enter the following command

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install 

At this time, you will be prompted to install Xcode select. In the pop-up box, we click Install, then the agreement will pop up, and then we click agree. Then wait for the installation to complete.

VScode import numpy Error: DLL load failed [How to Solve]

vscode & Anaconda import numpy failed: DLL load failed

Phenomenon:
in Anaconda prompt, import numpy is normal
in vscode, import numpy reports an error: DLL load failed

Error reason:
shell opening failed, resulting in CONDA activate failure. There is no environment, and naturally there is no numpy

Solution:
open the vscodesettings.json file

(type)               CTRL + SHIFT + P
(search for:)        open settings
(click:)             Preferences: Open Settings (JSON)

Add in settings.json:

	"terminal.integrated.profiles.windows":{
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
            "source": "Git Bash"
        }
    },
    "terminal.integrated.defaultProfile.windows":"Command Prompt" 

In addition, I also refer to another blog. You need to configure the environment variable
and put the following contents into this computer -> Attribute -> Advanced system settings -> Environment variable -> Path path:

D:\anaconda
D:\anaconda\Scripts
D:\anaconda\Library\bin
D:\anaconda\Library\user\bin
D:\anaconda\Library\mingw-w64\bin

An error is reported when installing the package directly in pycharm, but it can be installed through the terminal. Error non zero exit code (2)

An error is reported when installing the package directly in pycharm, but it can be installed through the terminal

The problem description is shown in the figure below:

Error content: non zero exit code (2) direct installation will report the following error , but you can use the command to install in the terminal in pycharm, but it is too troublesome to install every time, which is not applicable to problem analysis

The PIP I use here is version 21.3.1. I checked my previous projects and found that pip21.2.4 can be installed normally without error, so I reduced the PIP version of this project to pip21.2.4. However, I don’t know the specific reason why pip21.3.1 can’t be used. The problem is solved

    enter the directory where the project environment is located
    open windows PowerShell in administrator mode and enter the directory where the environment is located. Use python.exe in the project to run the command - M PIP install PIP = = 21.2.4

    The goal here is to use the python execution command in the project instead of the global Python execution command . Enter pycharm to view the PIP version installation package . If there is no accident, it can be solved. I solved the problem in this way. At this time, if you like, you can upgrade PIP again. I try to upgrade pip to 21.3.1 again, which can be installed normally

    Reference blog

      https://blog.csdn.net/CNWorldisyourFC/article/details/110468251?utm_ medium=distribute.pc_ relevant.none-task-blog-title-2& spm=1001.2101.3001.4242. https://blog.csdn.net/weixin_ 51119842/article/details/110469060.

[Solved] VScode sftp Code synchronizate Error: Error: No such file

Cause

After the extension is successfully installed, the file upload prompt error: no such file
but the code has actually been uploaded successfully**

Solution:

Open ~ /.Vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2streams/lib/sftp.js

search

options.emitClose= false;

Add under each search term

options.autoDestroy = false;

Remember to restart vscode for the changes to take effect.

Code screenshot

VSCode Error: collect2.exe:error:1d returned 1 exit status [How to Solve]

Recently, I learned the C + + program video of dark horse. When I realized the employee management system based on polymorphism, I knocked the same code as the video, but I couldn’t compile it successfully by using vscode, and the following errors occurred:

[Employee_Management_System.cpp 2021-10-22 13:58:17.099]
,,C:\Users\AAE3~1\AppData\Local\Temp\cc7ZdaG7.o:Employee_Management_System.cpp:(.text+0x1b): undefined reference to `WorkerManager::WorkerManager()'
C:\Users\AAE3~1\AppData\Local\Temp\cc7ZdaG7.o:Employee_Management_System.cpp:(.text+0x27): undefined reference to `WorkerManager::Show_Menu()'
C:\Users\AAE3~1\AppData\Local\Temp\cc7ZdaG7.o:Employee_Management_System.cpp:(.text+0x44): undefined reference to `WorkerManager::~WorkerManager()'
C:\Users\AAE3~1\AppData\Local\Temp\cc7ZdaG7.o:Employee_Management_System.cpp:(.text+0x57): undefined reference to `WorkerManager::~WorkerManager()'
collect2.exe: error: ld returned 1 exit status

After querying many blogs, it is found that the causes and solutions of errors such as collect.exe: error: 1D returned 1 exit status are as follows
1. The last compiled program is not closed, that is, the black box still exists. Find it and close or restart the IDE
2. The program has no main function or the main function is misspelled
3. Running in vscode will not help you save the code. You need to save the code before running
4. The file name and file path may cause errors in some compilers
5. There is an undefined reference. This is the case for this error. When instantiating the classes of other files in the main function, you need to define the .H file and .Cpp file of other classes to solve the problem.

#include<iostream>
#include"workerManager.h"
#include"workerManager.cpp"

[Solved] forrtl: error (200): program aborting due to control-C event

forrtl: error (200): program aborting due to control-C event
pycharm Error:
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFD5FCA3B58 Unknown Unknown Unknown
KERNELBASE.dll 00007FFDC015B933 Unknown Unknown Unknown
KERNEL32.DLL 00007FFDC15D7034 Unknown Unknown Unknown
ntdll.dll 00007FFDC2762651 Unknown Unknown Unknown

Solution:

pip install --upgrade scipy

Just run this in terminal. The principle is not clear.

ERROR: Rancher must be ran with the –privileged flag when running outside of Kubernetes

According to the document on the official website of rancher 2.4, only one Linux host is required. Remember that a single node rancher server can be quickly deployed. Of course, this can only be used for testing. Deployment is very convenient. Just start dcoker on the host, and then start a container:

sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher

After the test, it is found that the container is constantly restarted after startup, and there is no way to enter the UI, prompting a network error.

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                         PORTS               NAMES
bfd5c52a1ce7        rancher/rancher     "entrypoint.sh"     12 hours ago        Restarting (1) 3 seconds ago                       elated_heisenberg

View log:

[root@k8s-node02 ~]# docker logs --tail 3 bfd5c52a1ce7
ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes
ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes
ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes

If an error is found, it is said that — privileged is required to increase privileges
turn off the lifting appliance — privileged to try:

docker run -d --restart=unless-stopped --privileged  -p 80:80  -p 443:443 rancher/rancher

Found it

Java: compilation failed: internal java compiler error and invalid source distribution resolution

Reason: it is mainly because the JDK version is inconsistent        

1. The compiled version does not match. 2. The current project JDK version does not support        

1. First, view the JDK of the project

File -> Project Structure-> Project Settings -> Project

                  1.8 must correspond to 8

Check whether the JDK of the current project (module) is the same as that of the project

2. Maven is used in the idea to build the project. The target bytecode version is automatically changed to 1.5     Because no JDK is specified in maven, it will be scanned as the default JDK version   View and set the java compiler version (target bytecode version)

File–> Setting–> Build,Execution,Deployment–>Compiler–> Java compiler sets the corresponding module

         The appropriate version of target bytecode version, such as JDK1.8     Change 1.5 above to 1.8

Solution:

Add Maven compiler plugin to pom.xml so that it will not automatically become 1.5

     <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
      </plugin>

How to Solve IntelliJ IDEA Error: Cannot determine path to ‘tools.jar‘ library for 17 (C:\Program Files\Java\jd…

this month, Java 17 was finally released. This is another lts version after Java 11. I decided to try Java 17. Sure enough, something unexpected happened: when I used java 17 to run a project that used to run normally, IntelliJ idea reported the following error:

Operating environment when the author reports an error:

IntelliJ IDEA 2020.1.2 (Ultimate Edition)

JDK 17

Error:Cannot determine path to 'tools.jar' library for 17 (C:\Program Files\Java\jdk-17)

then, as before. The author tried to run a very simple demo project, and sure enough, the same error occurred again. The environment in which the project used to operate normally is:

The environment in which the project previously operated normally:

IntelliJ IDEA 2020.1.2 (Ultimate Edition)

JDK 11

the author has repeatedly installed multiple versions of Java on different operating systems, and is very familiar with this error report. This error indicates that the current IntelliJ idea cannot parse this version of JDK, so it tries to parse tools. Jar from its built-in environment variable classpath , but it still fails, so it throws the above error message.

this can be confirmed. It can be clearly seen in the project structure in the figure below that the author’s IntelliJ idea 2020.1.2 (Ultimate Edition) supports parsing JDK 14 at most, so there is nothing to do with Java 17.

Method 1

it’s easy to do when you know the reason. One way is to reduce the JDK version so that the current IntelliJ idea can recognize it.

The environment in which the project previously operated normally:

IntelliJ IDEA 2020.1.2 (Ultimate Edition)

JDK 11

install the lower version of JDK first, and then set it in project structure in IntelliJ idea. See the figure below. But I usually don’t like it.

Method 2

another way is to improve the version of IntelliJ idea. Therefore, the author specially downloaded and installed the latest IntelliJ idea 2021.2.2 (Ultimate Edition) . Unexpectedly and reasonably, the author encountered many holes when installing the latest IntelliJ idea. I have always wanted to stand on the shoulders of giants, but in fact, they are always used as stepping stones by giants. For the problem that IntelliJ idea cannot be opened after installation, see another blog of the author:

solve the problem that the interface disappears after IntelliJ idea is installed, and the interface does not move after it is opened again.

when I first downloaded it, I was worried that it could not parse Java 17, but now it seems that this worry is superfluous.

The environment in which the project operates normally:

IntelliJ IDEA 2021.2.2 (Ultimate Edition)

JDK 17

after upgrading IntelliJ idea, configure project structure as follows.