How to get Cilk working with Cygwin? - c

I have downloaded both programs, but I see no instructions on google for getting Cilk to work on Cygwin. Is there a Cygwin package that would work? I'm programming in C and have gcc installed.

Build it from source.
That will link the cygwin32.dll with the binaries which are essential for it to work with cygwin.
Here is a guide: http://groups.csail.mit.edu/sct/wiki/index.php?title=Cilk_Plus_Installation_Guide to build it from source with gcc.

Related

How can I compile tsschecker for Windows?

I'm trying to compile the C program tsschecker for Windows(on my Mac). I installed mingw-w64 with brew install mingw-w64, but I'm not sure how to use it to compile the program for Windows.
The Github repo for tsschecker includes instructions to compile for macOS and Linux(using make), but not Windows(but it includes Windows in the compatibility list).
I have access to a Windows machine if needed.
How can I compile tsschecker for Windows?

cross compile git repository with mingw under Ubuntu

I have a git repository which I can build with:
./autogen.sh
./configure
make
sudo make install
Now I want to cross compile it for windows with the mingw32/mingw-w64 cross compiler.
I tried it with
export CXX=/usr/bin/x86_64-w64-mingw32-gcc
but that didn't work for me.
I have configure eclipse that I can compile windows executables as well, that works, but only with plane c code. Now I need external libraries, which I have to compile for windows as well.
As described on a(n old, but mostly correct) page of the MinGW-w64 wiki (written by yours truly a long time ago):
./configure --host=x86_64-w64-mingw32
should do the trick if the package doesn't need special handling for Windows.

unable to compile C files (MEX) in matlab (Windows) using GNU GCC

I am trying to compile native linux c files on windows using GNU GCC compilers. For the installation purpose, I have followed the steps mentioned by Faheem in the following link :
Using GCC(minGW) as Matlab's MEX compiler
the example given there compiled successfully. but when i am trying to compile a file using thread functions, the following error is being thrown:
fatal error: pthread.h: No such file or directory
#include
^
compilation terminated.
I have installed all the components from MinGW installer related to GNU C compiler bu still the error persists. Can any one suggest a way to solve this problem. Thanks in advance.
According to the TDM-GCC "Quircks" page, TDM-GCC includes a pthreads emulation layer for Microsoft Windows systems, called "winpthreads", and a recent toolchain you should have x86_64-w64-mingw32\include\pthread.h in the TDM install path. So, I don't know what is wrong with Faheem's instructions, but you should have no trouble including pthread.h if MATLAB is configured correctly.
What is not stated on the TDM Quircks page is that TDM uses Winpthreads from the MinGW-w64 project. From the current README installed with TDM:
"Winpthreads" is one of the libraries distributed by the MinGW-w64 project, and
it allows GCC to be compiled with full pthreads compatibility, which is
necessary to enable std::thread and other threading related functions in the
C++ runtime.
As it states, Pthreads is part of the MinGW-w64 project and you can also get it with MinGW-w64 if you pick a pthreads enabled toolchain. For MinGW-w64, I do the following to set it up (see here for more details):
Grab the latest revision for w64 from Sourceforge (or use the installer to choose the toolchain you want, picking a pthread version).
Extract it so that you have a path to the compiler like C:\mingw-w64\x86_64-4.9.2-release-posix-seh-rt_v3-rev1\bin\x86_64-w64-mingw32-g++.exe. There is no need for MSYS, cygwin, or any other environment if you plan on compiling in MATLAB with mex.
Set it up with a custom mexopts.bat or using the new xml configuration system. On my GitHub repo, I have C++ configurations for MinGW-w64 in both file types: mingw_mexopts.bat and mex_C++_mingw-w64.xml. For example, using the xml file to set up C++ MEX file compilation:
mex -setup:C:\Users\Jon\Documents\MATLAB\mex_C++_mingw-w64.xml C++
If needed, set up the C compiler in a similar manner by modifying the config files.
I posted a more detailed version of the above instructions in my answer to the canonical question on the MinGW-with-MATLAB topic.

What does Eclipse CDT come with?

This is what i currently have installed on my home computer:
http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigosr2
Now, that was a pain to setup because you needed to use Cygwin to install a bunch of stuff in order for Eclipse to compile and run a C project. I found this the other day:
http://www.eclipse.org/cdt/
Does Eclipse CDT come with everything it needs to compile and run a C program or does it still depend on external files? Does it come with a standard library?
You do not have to use Cygwin and you can use alternatives such as mingw (it is simpler for most people to install). Checkout this tutorial for detailed description how to setup on Windows:
http://www.banym.de/eclipse/install-eclipse-cdt-on-windows-7
Compiler is responsible for standard library and in the case mentioned above it is mingw.
If you are on other hand interested about MAC OS installation checkout:
http://forge.mysql.com/wiki/Eclipse/CDT_on_Linux_and_Mac_OS_X
http://max.berger.name/howto/cdt/cdt.jsp

How to run a Simple C Program in Eclipse IDE

I've downloaded Eclipse C/C++ IDE . I need to run a simple c program in this(To print welcome).
While trying to run the program its popping up an error message like "Launch failed: Binary not found" .
Need i install any compiler package. ?
Please help me to do this.
Yes, you have to install a compiler, Eclipse is only an IDE. You can get MinGW here.
http://www.eclipse.org/cdt/
Look at the above link,you will get more idea,on how to do development using C/C++ using eclipse.
You can make use of the documentation which comes along with the IDE.
Just on the start up window in Eclipse click Tutorials and then click on c/c++ development link and then read Before you Begin part.
The program you write must be converted into respective binary which is to be run on that particular architecture.This process is carried out by the compiler as a result compiler is required for eclipse IDE to compile and link the code .
Various compilers are available such as Microsoft Visual C++ MinGW GCC or Cygwin GCC in the form of chaintools in eclipse so as to compile the code.
Eclipse is an IDE.It will help you write applications in c/++,but it will not compile your program as Eclipse does not comes with a compiler pre-configured.
You need to install a compiler to run your application.
Eclipse is capable to use many c/c++ compilers,some are:
1.Cygwin
2.MingW
3.Gross
4.Microsoft Visual C++
I would advise to install mingW OR Cygwin.
If you need more help on running a c/c++ application in Eclipse
visit http://www.ibm.com/developerworks/opensource/library/os-ecc/?S_TACT=105AGX44&S_CMP=ART

Resources