Remember a working environment configuration experience

Original link: http://blog.fivezha.cn/2022/10/15/a-record-of-assigment-enviroment-configuration/

One night with…

cause

In fact, there is no reason, it’s just that the simple lecturer arranged the homework for us to complete, and the first step is to configure the environment.

Back in the morning, A1 was released, downloaded, decompressed, code . Opened and glanced, and found that there was only one QT environment. Isn’t it easy to handle the environment. But the fact is that I was wrong. I started to work after dinner at night, and it didn’t work until the early morning. This article will record the process of configuring the environment at night.

the beginning of a nightmare

By reading readme.txt , the QT version is 5.13.0 and the download address is given. After an installation, start QT Creator ! Open RaytraceRenderWindow.pro and run! Error!

what? Why is it wrong? ? Take a closer look first…

hummmmmmm, it seems that clang does not support a library, after several searches, I got the following bad news.

Of course, the reply also gave the solution:

Aha, this is not the end of the installation!

Install! Link! start up! Error!

what? ? Why is it wrong again? ? ? Take a closer look first…

Oh, it turned out that there was no link (I should have realized that something was wrong at this time), I will link it separately. At this time, the .pro file has been created by

became

Compile! run! Error!

Why is it still giving an error? ? ? I’ll take another look…

Bad thief! Version 5.13.0 is only compiled to the x86_64 version! And brew installed only compiled for arm64 , so there is no way to use it! But I still think of two solutions:

  • Upgrade the QT version to the one with arm64
  • Compile a copy of libopm or find someone else’s compiled

With a rough plan, let’s go!

Get it!

PlanA

First test the first solution, upgrade the QT version to 6 or above, and then compile and link.

Compile! Error!

ah? Error again and again? Take a closer look, Asi! Why doesn’t it support OpenGL, I can only hope for PlanB .

PlanB

what! PlanA sent, I can only search on the Internet, flip through pages of Google, and finally, the hard work pays off, a big guy has compiled a copy, and supports both arm and x86 dual architecture ( link here )!

download! Link! Compile! run! success!

finally!

final

final

Finally, attach the modified .pro file:

Summarize

This incident made me feel how difficult it is to use MACOS (of course, there are also reasons for the old build system such as qmake ). The pain, the many compromise methods caused by the system being not open, really made me feel that this system is definitely not suitable for programmers, but what I miss is that I have only used Linux for half a year. With Electron With the development of technology, the software gap of Linux system will gradually decrease. One day, I will still switch back to Linux .

This article is reproduced from: http://blog.fivezha.cn/2022/10/15/a-record-of-assigment-enviroment-configuration/
This site is for inclusion only, and the copyright belongs to the original author.