How to install clang(LLVM 3.7.0) on windows alongside mingw(gcc 5.1.0) - c++

I was trying to install clang to use along side sublime text 3 for sublimelinter and auto complete , but there was an error, i tried to read about the how install clang on windows and several other sources and tried find question on stackoverflow and couldn't find anything to help me. If you can point to another post that might help or provide the steps , it will be great help.
error was -
Installing MSVC integration...
Failed to find MSBuild toolsets directory.
MSVC integration install failed.
Press any key to continue . . .

Related

C++ set-up for Visual Studio Code not working

So I am trying to code C++ on Visual Studio Code. I am following a tutorial from youtube. https://www.youtube.com/watch?v=DIw02CaEusY&t=597s
When I get to 9:58 is where I loose track. He gets a message on his #include that says edit "InlcudePath" settings
I am doing the exact same thing as him and mine doesn't work. I am not sure why. I will show screenshots of his video and my code. I would greatly appreciate if someone could help me. Thanks!
This is the youtube video's image
This is my image
You can follow this official tutorial to setup your VSCode environment, which is always up-to-date:
https://code.visualstudio.com/docs/languages/cpp
In short:
Open extension tab
Install "C/C++" extension.
Install compiler, depending on your OS:
Debian/Ubuntu: Install GCC using sudo apt install build-essential
Windows with BuildTools from Microsoft: Install Build Tools for Visual Studio 2019 from here: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
Windows with MinGW: Install MinGW like in the video you provided.
macOS: Install XCode
Follow one of the tutorial to setup VSCode:
Windows with BuildTools from Microsoft: https://code.visualstudio.com/docs/cpp/config-msvc
Windows with MinGW: https://code.visualstudio.com/docs/cpp/config-mingw
macOS: https://code.visualstudio.com/docs/cpp/config-clang-mac
VSCode, depending on your platform should automatically find the compiler you have installed. You can try also to restart VSCode if can't find any.
You should see .vscode directory in your project,
VSCode will ask you if you want to create those files.
error related to path , i guess you have to set the path of mingw bin folder in path of enter image description hereenvironmental variables in system variable

Fixing MinGW Installation on Windows 8

While helping my friend spin up MinGW and a C++ environment on his Windows 8 computer, I ran the get-mingw script and waited as it ran through all the mirrors for required downloads. However, three downloads completely failed:
libltdl - installer script hung and then moved on after pressing "OK"
automake-1.11 - installer script tried finding 1.10, then 1.9, then 1.8, then 1.7 (all of which failed) until finally settling on 1.6
mktemp - script hung and moved on after pressing "OK"
In all three cases, the script gave me a nice error log upon completion, showing that a majority of packages had been downloaded and installed except for these three, which showed up as errors. However during the installation process I had simply gone to the MinGW sourceforge page and manually found and downloaded each .bin.tar.lzma file that was missing.
Now that I have them, is there a good accepted way to unpack and plug them into my friend's existing MinGW install? In case it's tough, I'm comfortable with unix and dos command line so I'll be able to move executables into the MinGW/bin folder if that's what's needed, I just want to check for the best way to 'fix' the install.
As a side note - even though the error log says these are required packages, adding MinGW/bin/ to the PATH still allows for use of gcc and g++, although not make (possibly because of automake failure?). Is this standard behavior?
Firstly, the package issue can be fixed by using the MinGW installer - keep the packages selected and go to "apply changes" and the script will probably try to redownload the missing packages. I think the original problem was probably just a shoddy wifi connection during repository connection.
However, I then ran into a problem where I tried to run gcc and it gave me a missing -lpthread error ... but this question was able to help me fix that, and gcc and g++ are working fine now (haven't opened and tested Eclipse yet though). Just in case of link decay, the issue I cited arises from the MinGW installer script not downloading the lpthread library upon installation. To fix that issue, quoted from link:
Just run and open MinGW Installation Manager, which should be pre-installed with MinGW, select "All Packages" on the left panel, and on the right panel, search for "mingw32-pthreads-w32" packages and install them.
I think the Installation Manager has libpthread and pthread available for install, and pthread libs were the ones that seemed to solve it for me.

How to install Qt 3.3.8 in Ubuntu 14.04

Just recently I have begun to review the code for a project produced by a friend roughly 4 years ago. However, to compile this project I need an outdated version of Qt (version 3.3.8). Much of the code used in this project isn't supported in the same style as Qt4. So I'd first like to obtain Qt3 before I transition to Qt4.
Ubuntu has decided to no longer carry "qt3-dev-tools". Ubuntu has limited the selection to "qt4-dev-tools" in its repository. So installing via the command line option (sudo apt-get install qt3-dev-tools) results in an error:
"Unable to locate package qt3-dev-tools."
So, from here I did some digging for a manual installation? I found a great website to help me through the process, but I'm not very knowledgeable about Ubuntu, or Linux in general. Step 1 was simple. But step 2 and onward stumped me. I'm supposed to be both adding the environment variables listed in step two to the .profile file and then setting them, correct?
In step 2, is logging in again just meant for users with the .login shell? When I type in $HOME/.qt-license of step three, I suppose I'm typing this into the terminal?. Same with the ./configure? Both of these commands return no such file exists.
Does anyone know a better walk through to install Qt3 files, or can give a quick breakdown of this tutorial?
The website tutorial:
http://krm.am.gdynia.pl/doc/qt-3.3.8/INSTALL
If u can get .rpm package then open it in ubuntu software centre . It will get installed.
http://download.qt.io/archive/qt/3/ try downloading the package for qt3 from this qt archive & install it.

Having trouble getting Python to recognize location of vcvarsall.bat

I was trying to install RandomWords which requires ujson, at some point in the installation I received the following notification: "error: Unable to find vcvarsall.bat" I searched here, on stackoverflow, and came across some answers as the to root of this problem. In this answer https://stackoverflow.com/a/8705722, near the end, the OP pointed out that Microsoft had released a C++ compiler package for Python 2.7 (http://www.microsoft.com/en-us/download/details.aspx?id=44266).
I installed this package but still haven't had any success in installing ujson. So far I've tried the following:
Adding the location of vcvarsall.bat to the path environment variable
Manually tried loading the VC++ compiler's environment into the session by executing vcvars64.bat (aI've tried vcvars32.bat as well) as recommended here: https://stackoverflow.com/a/18045219
I've also tried installing the compilers found in "Windows SDK for Windows 7 and .NET Framework 3.5 SP1" found here: http://www.microsoft.com/en-us/download/details.aspx?id=3138
Not sure where to go from here, any suggestions/help would be greatly appreciated.
For reference here's some relevant specs:
Windows 8.1 (64-bit)
Python 2.7 (64-bit)
I've been trying to install said package using pip from the command prompt (e.g. '> pip install ujson')
I've uninstalled all the C++ compiler packages I've tried except this one: http://www.microsoft.com/en-us/download/details.aspx?id=44266
Really don't feel like installing mingw, but I'll try it if it seems like it's the only solution.
-UPDATE-
I ended up modifying "msvc9compiler.py" and manually setting the location of vcvarsall.bat by setting the value of the vcvarsall variable to the location of that batch file. Everything compiled fine but this is not a recommended solution. I'm pretty sure the compiler version I have matches the one python 2.7 uses, but as mentioned in an answer, in another question on this topic, if these don't match it can cause problems since "the compilers will probably have incompatible C runtime libraries."

Failed to clean when building wxwidgets using MinGW

I have a problem when cleaning wxwidget using MinGW. The last error is like this :
make (e=2):system cannot find the file specified.
mingw32-make : *** [clean] error 2
and it seems like all of the errors are the same as the one I posted above, and that errors can be seen from the start of cleaning process (after typing mingw32 clean instruction).
Do you know how to solve this?
I have already followed every step mentioned in wxwidgets wiki and any other wiki that explain the way to install this. Of course I didn't install MSYS or anything mentioned in the wiki, just minGW only (and Code::Blocks, but both of them are installed separately).
BTW, I am using the latest stable minGW (3.8x) and the version of the wxwidgets I am getting problem with is 2.9.4.
Any help would be appreciated. sorry for my bad english :)