Clang installed on Windows, where is the make executable? - netbeans

I'd like to use Netbeans (12.4), on Windows, with Clang. I used the LLVM installer and Netbeans detected most of the executables. See image below.
However, whilst the C and C++ compilers have been found, I can't find anything in the LLVM folder to provide a make command.
What is the best way to resolve this?

Related

Clion gdb not found, but working with netbeans

I've seen some other stakoverflow question like this one:
CLion Installation: Cmake compilers not found, GDB not found
But it's not quite the same problem.
My problem is that only my gdb.exe is not found by Clion. I can compile and run programs without problem, but when i need to debug the program tell me that only the debbuger is incorrect.
The problem is that my gbd.exe is present in my cygwin/bin folder
and i have it also in my PATH (system variable)
What i've done so far:
delete, shutdown and reinstall cygwin from scratch.
Install Netbeans and try to run with cygwin config (and debugger) -> everthing is working and i can debug my program. I also try to select it manualy.
So the real question is why Clion think my gdb is not present?
An how can i make it work?
Thank you for your help
Try to install GDB version 7.10.1
My settings:
Short answer: check what versions of gcc, g++ and gdb you have installed. They should be of the same major version.
Long answer:
Try to launch gdb.exe from cygwin terminal. You will probably get something like this (I'm using mingw64 from msys2 so folder will be different):
$ gdb
C:/msys64/mingw64/bin/gdb.exe: error while loading shared libraries: libgcc_s_seh-1.dll:
cannot open shared object file: No such file or directory
But you have gcc installed so you will have this DLL inside C:/msys64/mingw64/bin (in your case folder is different). The problem is that your gdb and gcc are of different major versions. I got this problem when installed mingw-w64-x86_64-gcc-7.3.0-2 with mingw-w64-x86_64-gdb-8.2.1-1. That's why gdb was not able to launch and CLion was not able to check GDB version thus outputting "Not found" error.
If this is the case - remove gdb and install it again. Now with correct major version (same as gcc). Since you're using cygwin, launch cygwin setup again, search for gdb package (don't forget to change view to full) and change version to be the same as gcc. Or, alternatively, you can change gcc version to be the same as gdb (in my case this wasn't possible).

MinGW or Cygwin GCC?

I want to install a GCC compiler in Windows for the Eclipse IDE. I know there are two options: MinGW GCC or Cygwin GCC. Which one is better for Eclipse CDT? Any experience or suggestions will be appreciated.
Using Cygwin means your program will be dependent on cygwin1.dll, which is essentially a layer that allows POSIX functionality to be used in a Windows environment. Compiling with the standard MinGW GCC provides no such dependancy. This means however, if you intend to compile with MinGW GCC, you will not have access to POSIX functions such as fork() and exec().
For more information on the differences between Cygwin and MinGW, see here.
My offhand thoughts are, if you need cygwin, you need it. For instance compiling programs that were developed for Unix and have symbolic links and shell scripts in the build system.
If you don't need it, you don't want it. And compiling under linux on a virtual machine is often a better choice than going the cygwin route.
So mingw is perfectly fine. Works fine, simple to use.
Also: You might consider codelite (www.codelite.org) instead of Eclipse.
Personally I like Cygwin better, it has a lot of installation options and it feels a lot like the terminal you'll find on a Linux machine. It provides a pretty substantial set of Linux-like capabilities, something that Windows fails at miserably.
Cygwin and Mingw are not interchangeable alternatives. Cygwin is used to compile POSIX API programs, Mingw is used compile Windows API programs.
Chose one or the other depending on what kind program you're going to write.
Wikipedia Says:
MinGW forked from version 1.3.3 of Cygwin. Although both Cygwin and MinGW can be used to port UNIX software to Windows, they have different approaches: Cygwin aims to provide a complete POSIX layer that provides emulations of several system calls and libraries that exist on Linux, UNIX, and the BSD variants. The POSIX layer runs on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Windows programs written with Cygwin to run on top of a copylefted compatibility library that must be distributed with the program, along with the program's source code. MinGW aims to provide native functionality and performance via direct Windows API calls. Unlike Cygwin, MinGW does not require a compatibility layer DLL and thus programs do not need to be distributed with source code.
Because MinGW is dependent upon Windows API calls, it cannot provide a full POSIX API; it is unable to compile some UNIX applications that can be compiled with Cygwin. Specifically, this applies to applications that require POSIX functionality like fork(), mmap() or ioctl() and those that expect to be run in a POSIX environment. Applications written using a cross-platform library that has itself been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK+, will usually compile as easily in MinGW as they would in Cygwin.
The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the registry or files on the computer. Cygwin Portable provides a similar feature. By providing more functionality, Cygwin becomes more complicated to install and maintain.
It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows without Cygwin.

Compiling MEX files in Matlab 32bit running on Windows 64bit

What is the right setup to do this?
Currently when I enter mex -setup, the compiler list is empty.
I installed Visual C++ Express 2008 and Windows SDK, but the supported compilers list is still empty.
You need to manually configure the mexopts.bat file, so that your compiler is identified by the mex command. Here there is an example mexopts.bat file: http://www.playrec.co.uk/download/mexopts.bat - be sure to edit it to fit your system settings (path etc.). Also, you should put this file in the current folder when you compile the code, otherwise Matlab will use its default file.

How to use MPI (openMPI or MPICH2) with minGW - GNU gfortran compiler

I am using the eclipse PTP IDE to develop MPI code, I want to be able to compile MPI on windows, it seems to provide c++ and c binding, but I am writing using fortran and gfortran compiler and would like to work in windows, the current problem doesn't exist on linux because there it is possible to compile the libraries locally in linux and use the .mod modules.
I wanted to compile the modules using cygwin but the GNU gfortran version on cygwin is too old, and I wasn't successful openMPI or MPICH2 on windows using miniGW
any suggestions? maybe using c++ binding in fortran 2003, I write my code in fortran 2003 so it support this feature.
Documentation on this issue is lacking.
Thank you.
According to the MPICH2 Installer's Guide MPICH2 can be built under cygwin (see section 9.3 of the same document), so the version of gfortran shouldn't be an issue. Have you followed the instructions in this document (in particular section 2)?

Compile GTK+ with Cygwin

I have created an application in linux with GTK2 as GUI. It uses some linux-specific headers (e.g. arpa/inet.h) so to run under Windows I have to compile it with Cygwin. I downloaded the latest installer and choose to install GTK2 and its dependencies. My program compiled fine. But it needs X server to be running! I has old-style, ugly graphics and it doesn't open in a different window, like all Windows' applications do, but inside X server's window. Because of this it can't be portable. I found that guide, which is exactly what I need, but I get an error when I run "make" for GTK2 (undefined reference for _IID_IFilePersist, although I have uuid installed - also tried it with gtk2.20). Can you suggest what to do to build my application with cygwin? Or what do I need to install for the "_IID_IFilePersist" error? Thanks in advance!
There's prebuilt packages for windows that doesn't rely on X. http://gtk-win.sourceforge.net/home/index.php/Downloads
If you don't want X server to be running, then you're going to have to port the linux-specific parts of your code and compile with MinGW rather than Cygwin.