Minimal compile environment on Windows 8.1 [closed] - c++

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Trying to compile this WinURL tool from source on Win 8.1:
http://www.chiark.greenend.org.uk/~sgtatham/winurl/
(src zip on that page if you want to take a look)
The reason is that I want to change the keybinding from Win+W to something else as Win 8.1 takes over Win+W for search and the tool no longer works on Win 8.1
What are my choices for a minimal dev env on Win 8.1? I'm not interested in installing GBs of tools if I can get away with something very simple that just lets me compile the above. Would something like Cygwin gcc or MinGW work or do I need some sort of Visual Studio and if so is there a simple free edition I can use?

If you're looking for a lightweight compiler-only solution, don't look beyond MinGW. You can install it and add its bin folder to the Environment PATH variable.
If you want an IDE too, I would recommend CodeBlocks, or DevC++.
I would recommend CodeBlocks over DevC++ as people report to DevC++ being slow, and also its development cycle is very slow.
These are all free and open source solutions. And lightweight.

I got it to compile just fine with MinGW using the following script:
del *.o winurl.exe
windres winurl.rc winurlres.o
gcc -c winurl.c
gcc -o winurl.exe winurl.o winurlres.o C:\MinGW\lib\libgdi32.a -mwindows
strip winurl.exe
del *.o

Related

How to run gui based programs on macbook by terminal [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am on mac os and have terminal in it. I run simple c++ programs on terminal by command g++ but i don't know how to run gpu based c++ programs like code containing graphics.h file
And pls suggest how to download all c++ libs and c++ in mac without xcode (because it is of 5.5gb)
Is it possible...
macOS has au unusual way of producing executables called app bundles. (Historically this is to reproduce on the HSFS file system what was part of the old OS 9 filesystem which associated attribute data to files).
Here is a link explaining how to launch an executable from a terminal. In short, use
open -a ApplicationName

Replace MPICH Installation by OpenMPI [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I currently have MPICH (release 3.1.4) installed on my machine (running Mac OS X 10.10.5). I would like to remove it and install OpenMPI instead but could find no instructions online on how to uninstall MPICH.
Is it sufficient to simply delete MPICH's directory? If so, where can I find it? I thought I had installed it in usr/local and did find some MPI-related files there (in a folder named include) but nothing that seemed like it was the whole thing.
Also, I am planning to use OpenMPI together with Intel's c++ compiler. Is there some preferred order of installation of these two?
Juste type make uninstall from the directory you compiled. That should do it.
Regarding openMPI and the Intel compiler, better installing the compiler before ans using it to build the package, but that's not compulsory, using GCC will do as well.

How to compile a Linux program with Mingw? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a Linux program that I want to run on Windows. I want to compile it for Windows using Mingw?
I am new to this Mingw thingy. So, I have no idea if it will work.
I installed Mingw and I have a make file. What's next? I have a bunch of exe files in Mingw. I don't even know how to start the compiler.
So, my question is: What are the steps necessary to compile the program I have?
UPDATE:
I figured out in the end what are the steps necessary to compile a Linux program for Win using Mingw.
I posted the solution below (solution is 7 steps), maybe it will be useful to others also.
To compile a Linux program on Win:
Install MingW
Edit the c:\MinGW\msys\1.0\etc\fstab file (it should contain this line: c:/mingw /mingw )
Start Wingw shell by running c:\MinGW\msys\1.0\msys.bat
In shell go to the folder where your Make file is (use cd command for this).
Type 'make'. This will compile your program.
Put the generated EXE and the required DLLs (libgcc_s_dw2-1.dll and libstdc++-6.dll) in the same folder
Run the exe file and enjoy it....

C and C++ programming on MacBook [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I recently bought a macbook and was wondering if I can write C and C++ programs on mac without having to install anything more. Say for Java, mac came with a preinstalled version.
Is it the same for C/C++. if yes, can you pls let me know hoe to compile and run a sample program or if not, can you please let me know what stuff to download?
You need to install the Mac Developer Tools either from your original Mac OS X disk or by downloading the latest version. This package includes the GCC compiler collection (supporting the C and C++ languages, amongst others).
You need to install the developer tools, which are on your MacBook DVD. Check for custom installations.
You should install Apple Developers Tools.
Basically you should get a (free) developer account and then download Xcode.
Unfortunately, starting with Xcode 4, Apple is charging 5$ for the download. So you could either decide to pay this, or download the previous version (Xcode 3)
The main page for Xcode is this. There you will find links to Xcode 4 and Xcode 3 (search within the page)

What is your favorite eclipse plugins for c / c++ development? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Besides just the CDT what do you find essential for c development using eclipse?
If you're doing development on Linux, then Linux Tools is very useful.
These are my favourite:
cppcheck (static code analysis)
valgrind (to find memory leaks)
google test (to make unit tests very easily)
Subclipse for svn integration
Qt Eclipse Integration plugin: http://qt.nokia.com/developer/eclipse-integration
Require Qt4.5. Both the plugin and Qt are free... as in beer and freedom!
I normally use cmake to build C++ projects. Recently I have been using the Eclipse CDT4 Generator and it works quite nicely, see this link or this one.
I have tried on Linux I don't about Windows. I know this project is trying to make easier develop with C++ on windows using Eclipse but it still have pending things.