How do I change variables in the default environment in which applications opened from Finder run? - macos

I noticed when I open an .app program in Finder, the environment variables are very different from when I open in terminal or zsh. As my eclipse-cdt:
In my Makefile, I use a GCC := i386-elf-gcc to compile my .c. > which i386-elf-gcc in terminal shows > /usr/local/bin.
When I open eclipse-cdt in zsh or terminal use shell command > open /Applications/Eclipse.cpp, I enter into my project and press build button. And it compiles perfectly.
However, when I open eclipse-cdt in my Finder, similarly click the build button, I got an error as follow:
make all
make: i386-elf-gcc: No such file or directory
make: *** [boot/bootmain.o] Error 1
I'd like to know how could I do it. And thanks for a buddy that he told me to ask the question. Link: How to use linux path in eclipse cdt?
Sincerely thanks!

Related

how to run output.out file when I click on run (green triangle) in qt creator

I have output.out which is main.cpp but when I click project -> run I have problems with configuring it.
My command line arguments: Desktop/с/project/a.out
with no executable or working directory params and I have error because I need to set an executable in the custom run configuration.
Somehow I need to open it with a command, but I don't want to do it.
I solved the problem by clicking browse in 'executable' tab so the current path is /home/user/.../a.out

ninja: error: loading 'build.ninja': The system cannot find the file specified. when build hello world in Visual studio

I have followed esp-idf guideline to install and test to build the hello world and blink sample code but both the code met this problem.
Visual studio try to build hello world
> Executing task: ninja <
ninja: error: loading 'build.ninja': The system cannot find the file specified.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.
I have tested all the ways I can find to fix it but I'm not sure anything I missed or not.
This is one of the way that I test but also met some problem.
cmd try to run the command below
C:\Espressif\frameworks\esp-idf-v4.4>python -m pip install --user -r %IDF_PATH%/requirements.txt
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
This possible problem is the python environment is exist so I cannot do this command, but I try many ways to disabled or deactivated it still cannot.
python path
system environment
After trying to debug this for a long time, I made a backup copy of the entire project folder, then just went hog-wild deleting files. I deleted almost every file I didn't author. Only left the main/CMakeLists.txt, main/component.mk, main/main.c, main/main.h, .gitignore, CMakeLists.txt, and Makefile. Then I ran idf.py set-target esp32 and idf.py -p /dev/ttyACM0 flash monitor and it worked fine again.
VS Code & ESP-IDF on Ubuntu 20.04.05 LTS
Check if the compiler is properly selected. If you don't select a proper c/c++ compiler, then you might get this error. I had mingw in my system, but vs code did not auto detect the compiler. Then I manually added mingw and selected it for compilation after which this issue was resolved.
What worked for me after updating to the new stable release (v5.0) was
Go to the folder S:\esp\esp-idf\esp-idf-v5.0
Run command prompt at this directory and execute install.bat and later export.bat
After trying to build the program in VSCode the error "ninja: error: loading 'build.ninja'" shows up.
Update the path in the ESP-IDF extension in VSCode using ESP-IDF:Configure Paths
locate your project folder e.g. "V:\simpleTest_using_EspIDF_v5_0"
Open command prompt and execute: idf.py build
Now it builds also in VSCode using the Espressif IDF extension.
You not have a build.ninja file. Find this file on proje

code blocks not running

I use ubuntu 12.1 64db,I installed code blocks but when I run a project "c project" it gives me "It seems that this project has not been built yet,Do you want to build it now?"
when I click yes it gives Linking console executable: bin/Debug/test /bin/sh: 1: g++: not found
so how can I run the project?
I'll assume that you want to execute your code. In that case, when you want to run it, you must first click yes to building the project. Since you must first compile and link your code into a final executable before it can be run.
Edit: He didn't have g++ >.>
Install g++ with sudo apt-get install g++ and that should solve your issues.
--1. First of all download MinGW : https://sourceforge.net/projects/mingw/ [][1]
[1]: https://i.stack.imgur.com/XJndz.png
--2. Double click the mingw-set-up.exe and press Install. [][1]
[1]: https://i.stack.imgur.com/Pz5Jf.png
--3. Dont change the Installation Directory and press Cointinue
[1]:https://i.stack.imgur.com/boOGj.png
--4. Wait until installed...
[1]: https://i.stack.imgur.com/8WCnJ.png
--5. Then press Continue and wait again..
--6. Mark all files for installation
[1]: https://i.stack.imgur.com/qtq08.png
--7. Go: Intallation --> Apply Changes. Press again Apply and wait the Download Package.
[1]: https://i.stack.imgur.com/mNvtB.png
--8. Press "Close dialogue automatically,.." and wait...
[1]: https://i.stack.imgur.com/65efE.png
--9.You can close MinGW.
--10.Copy the addres of new MinGW bin file which should be C:\MinGW\bin
--11.Right click on your start and press System
--12. Press Advanced system settings--> Environment variable
[1]: https://i.stack.imgur.com/Pr2sL.png
[2]: https://i.stack.imgur.com/TZ1oK.png
--13. In System variables click Path and then Edit.
[1]: https://i.stack.imgur.com/9pCEO.png
--14. Then press New and paste the addres of file "bin" that is inside of file MinGW in Documents(step 10) that should be C:\MinGW\bin.Then press OK-->OK-->OK.
[1]: https://i.stack.imgur.com/pQmFF.png
--15. Open cmd.I mean Right click on your start and press Command Prompt.Write
g++ --version and press enter. [If it is like this you dont have problem][1]
[1]: https://i.stack.imgur.com/a52LH.png
--16. Open Codeblocks go settings-->Compiler. Select" GNU GCC Compiler ".
[1]: https://i.stack.imgur.com/hU9pB.png
--17. Go Toolchain executales and fill in the blanks as in the Screenshot .Files must be in local disk in C:\MinGW\bin chose from there.
CAUTION!!!! This SCREENSHOT IS FOR 32-BIT SYSTEMS. I am not sure for 64-Bit systems. [32-BIT SYSTEMS][1]
[1]: https://i.stack.imgur.com/8JJh0.png
--18. If you have 64-Bit dont do the 17st step and tried if it works .If it's not work do the 17st step.If it's not work again try to put files (to "C compiler", "c++ compiler" and to "linker for dynamics li") that have almost the same name as the files that are in screenshot.

aptana 3 windows - terminal access denied

Wen I open the Antapa studio 3 terminal from specific project it notice me an error:
Permission denied to access C:\www\drupal\sites\all. Using default working
directory instead.
Also, I can get to the dir by cd C:\www\drupal\sites\all so it pretty wired..
Is somone handle with this issue, or is smone have any idea?
~ Almog Baku
I have exactly the same problem. You have described it exactly. I found no solution but here's my workaround. First, I want an EXTERNAL terminal window because the Aptana terminal window is too inconvenient for running git and rspec from the command line, so my solution always opens to the current project directory. Also note that I'm on a Mac and my solution is Mac specific.
From the Command menu, I selected Shell Script, and used the "Edit this Bundle" option. After some head scratching, I found that the bundle had been opened as a new project. Then I edited the open_directory_in_terminal.rb file to this:
require 'ruble'
command t(:open_terminal) do |cmd|
cmd.key_binding = 'M2+M4+O'
cmd.output = :output_to_console
cmd.working_directory = :current_project
cmd.invoke do |context|
`open -a Terminal.app "#{ENV['TM_PROJECT_DIRECTORY']}"`
end
end
Basically, all this does is use the Mac OS "open" command to open the Mac terminal app on the current directory. I am sure there are more elegant (and platform independent) ways to do this, but this is what I am using. Hope it gives you some ideas.
FYI, docs on editing the bundle items are here:
https://wiki.appcelerator.org/display/tis/Rubles

Cannot compile Qt address book example on OSX

I have the sample address book project loaded up and it is failing to compile on OSX 10.6.8. Here is the output I am getting:
No valid Qt version set. Set one in Preferences
Error while building project part1
When executing build step ‘QMake’
Canceled build.
I click on the Projects tab on the left and I scroll to the “General” section, and I click on “Show Details”. I see the “Qt Version” is set to “Default Qt Version (Qt in PATH)”. I click on the manage button and it shows me that the version it is using is in /usr/bin/qmake. So I got to the terminal and I type “/usr/bin/qmake” and I get the help output. What am I missing?
Edit: Some additional details:
I can use the terminal in the project's root directory to run the command 'qmake part1.pro -spec macx-g++ -r' which is defined under the Projects tab in Qt Creator. It produces no output, which leads me to believe it worked correctly.
I then run the listed make command which is 'make -w'. I receive:
make: /Developer/Tools/Qt/uic: No such file or directory
make: *** [ui_addressbook.h] Error 1
make: Leaving directory `/Users/jsmaupin/part1'
When I check, the Qt directory does not exist under /Developer/Tools. However, there is a directory at /Users/[user directory]/QtSDK, but it does not contain anything named 'uic'.
I know I asked this a long time ago, but I saw this on my profile and I just wanted to post what my solution was. The problem stemmed from the Qt installation. There was an error dialog which I had ignored.
Qt requires XCode's command line tools in order to install on the Mac. If you open XCode and go to Xcode > Preferences > Downloads > Components, you'll find a list of installable packages. Click install on Command Line Tools and let it install.
Then, try to install Qt once more. It should work without any problems.

Resources