Why is `qmake -v` version not changing after installing later version? - macos

I'm updating my version of Qt for development purposes on my mac.
So I downloaded and installed the opens-source .dmg from the Qt website (https://www.qt.io/).
During installation, I specifically checked the box to install version 5.0.2.
But afterwards, when running qmake -v, it still says the version is 4.8.7.
Make version 2.01a
Using Qt version 4.8.7 in /Users/my_dir/anaconda/lib
(Note: it also points to /lib directory in /anaconda, even though I'm setting this up for Rails purposes. Not sure if this has any impact.)
Can anyone advise how I can change the version that is being pointed to?

Below is what worked for me, incase anyone else has this issue.
Check which version of qmake is being used. which qmake.
Remove anaconda from mac $PATH.
Force homebrew to symlink binaries. brew link --force qt55.
Re-check which version of qmake is being used. which qmake.
When you check the version of qmake the second time, it should point to the new version of qmake that you have installed.
Note: You will have to redo this for every terminal session where you want to use the newer version of qmake.

Related

MinGW32/64 and GCC: Installing and Upgrading on windows using cmd

I have already installed MinGW32. I want to update MinGW32, GCC, and G++ on the latest available version. I have searched on the internet and overflow but the answers seem to be outdated. One of the answers, I tried but it shows the same version of MinGW and GCC( latest version is 10.2 and I have 9.2.0) as before.
Moreover, my machine is 64 bit so I want to upgrade my MinGW to MinGW64 but despite lots of efforts and internet searches, I am unable to get an executable setup for the system, neither cmd instructors to install. Also, I am unable to discover instructions for its updating to the latest version available( for future purposes)
Please help me to accomplish the above tasks. Also, it would be better if the step by step instructors are provided using cmd. Thanks in advance.
The MinGW-w64 personal build from http://winlibs.com/ has the latest GCC version (currently 10.1) and requires no installation, just unzip the download.
If you need to upgrade this later you can just replace the mingw32 or mingw64 folder with the new version.

Replacing old Xcode command line tool with newer Brew version

I'm trying to build a binary from source code which has a dependency on the package" NASM 2.12.02 or later. However, I have an earlier version already installed on my Mac via Xcode:
/usr/local/bin/nasm -v
NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on May 1 2018
So to (attempt to) rectify this, I used Homebrew to install a much newer version of the package
brew info nasm
nasm: stable 2.13.03 (bottled), HEAD
However, now my PATH is only pointed to the old NASM executable, while the new tool seems to be sitting in Homebrew's Cellar (ie. /usr/local/Cellar/nasm/2.13.03).
Is there a nice way of "switching" between these versions so that the system PATH views only the newer version and disregards the older one? So far I've thought of rm -rf-ing the old version and exporting the new version to my PATH, but that seems very destructive.
Also, I have run the command: brew doctor and have resolved all linker errors, but that has not seemed to help.
Any help would be greatly appreciated!
To fix this, I used the following command:
export PATH=/usr/local/Cellar/nasm/2.13.03/bin:$PATH
This modifies the PATH variable to point to the /usr/local/Cellar/nasm/2.13.03/bin directory and find the nasm executable there before looking in /usr/local/bin.

Which one I should download? "Download the latest version of libclang"

I want to install YouCompleteMe, on Mac OSX, early 2015.
I have installed it under guidance of Mac OSX part. However, I got one warning:
NoExtraConfDetected: No .ycm_extra_conf.py file detected.
Then I read the full installation guide, and know that I should Download the latest version of libclang. However, there are so many source code on the official webpage of LLVM, and I don't know what to install (figure below).
So, could you please tell me, which one I should install?
Thanks!
If you go to http://llvm.org/releases/download.html#3.8.0 you can see Pre-Build binaries for MacOsX that's what you need to download and extract. Once you extract this. You will need to source it's location using the path variable.
Now, You can also install clang using brew from the terminal.
brew install --with-clang llvm

Remove Qt libraries on Mac

I want to remove the installed Qt 4.8 libraries and install Qt 4.6 libraries on my mac.
But when I try to install them I get:
"Qt libraries cannot be installed on this disk. A newer version of
this software already exists on this disk"
I removed the /usr/local/Qt4.8.x folder from the disk but the message is still here.
How can I remove the old libraries?
You shouldn't manually delete a folder unless there is no other option. You should try running the uninstall script first:
sudo python /Developer/Tools/uninstall-qt.py
The path to this script will be different if you are running the latest Xcode app bundle and not the default Snow Leopard/Lion Xcode.
I installed qt via homebrew. To remove I simply wrote the following in the terminal: brew uninstall qt#4

What's a proper way to install Ruby <1.9.3 on OS X Lion with Xcode 4.3?

Until recently I used to have Xcode 4.2 with the osx-gcc-installer installed on top of it, which worked quite well for older versions of Ruby.
The thing is, that now that I installed Xcode 4.3 with the command line tools (for homebrew), I found that I don't have gcc-4.2 on my system.
From what I was able to find, the usual way to install pre 1.9.3 is to either get an older version of Xcode, or using the osx-gcc-installer. I also found a warning saying that if I install osx-gcc-installer over Xcode 4.3, it will cause problems with node.js.
As I'm currently doing both iOS and node.js development alongside Ruby, I can't really do any of these things. Which means I can only work with 1.9.3, which is the only Ruby version that can be compiled with LLVM.
Is there a clean way to install any older version of Ruby without sacrificing Xcode 4.3? The solution that comes to my mind is having gcc-4.2 in some kind of non-system-wide sandbox and specify it's path when installing Ruby, but I'm not really sure how to do this properly.
Update:
See this link for the process required to get GCC-4.2 onto a machine with Xcode 4.3 without overwriting other components.
Xcode 4.3, Homebrew, and Ruby
It will obviate the need for the instructions below:
RVM should work if you set the default compiler for RVM to gcc. Place this in your .bashrc or .zshrc.
export CC=/usr/bin/gcc-4.2
RVM should then use GCC to compile.
If you don't want to have CC set permanently then you could try installing with:
CC=/usr/bin/gcc-4.2 rvm install 1.8.7

Resources