Compiling and running C++ on Emacs in Windows 7 [closed] - c++

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 8 years ago.
Improve this question
So, as background, at college I learned how to code python in Emacs in a Linux OS, and while I am at home I downloaded Emacs on my Windows 7, and had a more advanced programmer alter the environment path to a file which is C:\Users\Kimi
I save the .py files I write in Emacs to that Kimi folder, and then create a shell using M-x shell and then run the files using "python example.py"
THIS IS WHAT I AM USED TO SINCE I KNOW PYTHON
however, due to attempting to learn C++, every single tutorial I go to talks about "gcc" and "g++" but no matter how many times I attempt to compile they always say those two terms are not recognized. I think I need to download something, but I have no idea what important things to do in order to have a correct path and stuff because I wish to save all my C++ stuff to C:\Users\Kimi\C++, and be able to compile and run those files smoothly. On Windows 7, of course.
So I am not sure how exactly to go about this. Any kind of helpful instructions would be absolutely wonderful! I am brand spanking new to C++ so being a little detailed would be great, too.

Download and install cygwin. The world will make sense agian :)

Related

how to create a setup.exe (windows) or package (linux) [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 4 years ago.
Improve this question
I have developed a software and would like to send it to other people.
Right now I have a folder with the compiled binary (.exe) and all necessary dlls and everything else you need.
So far I can simply copy this folder to another pc and it works.
It would be great to create a real setup.exe for windows and anything equivalent for Linux.
How can I start to create such installers? Can anybody provide a link with useful information?
This is well documented in multiple places.
To make a Windows MSI installer, take a look at WiX.
To create packages for RPM based Linux distributions, read up on RPM. For distros using Debian (deb) packages, read debian packages. For distributions using other package formats look at their websites and find their documentation on their package formats.
Also take a look at flatpak.

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

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....

Eclipse with C++ compiler bundle [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm about to teach intro C++ class and would like to use Eclipse for the development/learning. In order for students to setup Eclipse C++ to work on Windows it will not be very intuitive to install the compiler then install Eclipse and configure it. My question, is there a way to bundle them together and then provide students with those files to extract on their computer and start development.
If you install MinGW to the default install location C:\MinGW then the Eclipse CDT will automatically detect the MinGW toolchain and configure itself correctly.
If you run into issues make sure the PATH variable points to C:\MinGW\bin, this can be done automatically by providing a script to your students but may not be neccecary as the MinGW installer should do it automatically.
Are all of your students working on the same computers such as lab computers? Or on their own computers, which may have different os and 64/32 bit?
If they are all working on the same platform you could create a directory with applicable java/eclipse/and c compilers and a quick tutorial with a script to set their environment variables.
If they are working on their own computers this becomes very complicated. They will need different versions of each java/eclipse/ c compiler and will probably each run into different issues.
I am a student and we tend to have old computers. The first time I tried to run eclipse cdt was on a computer with vista.
That being said, you can create a zip directory with several different options that they could download and install. This is a headache I had to do for my senior design team. 7 of us ran into 6 different issues.

Has anyone successfully used Eclipse CDT + Eclim + CDT4 Generator? [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 5 years ago.
Improve this question
Has anyone successfully used these three together? I used CDT4 to generate my eclipse project files. With the GUI version, things work fairly well. Most features work. Although I have problems with external libraries. For some reason eclipse won't recognize the standard library strings and some of my other external library variables. I've read online that modifying "C/C++ Build" properties can help. However when I use CDT4 to generate my workspace, that option disappears in the preferences menu.
Now when I try to use eclim and vim to work on my workspaces I run into more strange issues. It seems like the completion stuff works pretty well. And Eclipse will mark problem lines with ">>" notation. However I've noticed that navigating the code is not working at all. For example hierarchical call trees and jumping to the definition of a symbol. These things work fine in the GUI.
Does anyone have any tips/tricks to help me out here? Are there any solid guides on the web that address issues like these?
Thanks!