Jump to content
Phishing Emails & YouTube Messages - Fake Giveaway Read more... ×
Search In
  • More options...
Find results that contain...
Find results in...
Divergent2000

[Noob Question] Setting up Eclipse C++ with MinGW?

Recommended Posts

Posted · Original PosterOP

Ok, so I basically need to build/compile a simple keylogger (from Alan T. Norman's book "Hacking"). I followed the instructions for setting up Eclipse (the instructions found in said book), but of course things like GCC were missing in MinGW and Eclipse was making a fuss, so I tried to kludge GCC into MinGW somehow and ended up with a mess after fixing a few errors. Is there an up-to-date easy-to-follow 'for noobs" tutorial on setting up Eclipse and MinGW on Windows for absolute beginners that haven't ever before touched these types of tools? The only IDE that I know (to some degree) how to use is Borland Delphi (which has a built in compiler), but that knowledge doesn't exactly help with C++ and Eclipse/GCC/MinGW. All the Eclipse/MinGW tutorials and forum posts I've found are assuming that you either have experience with this stuff before hand and/or that you are using Linux. All I want to accomplish at the moment is to be able to painlessly run C++ code without any hassle regarding the IDE/compiler.

Link to post
Share on other sites
23 minutes ago, Divergent2000 said:

Is there an up-to-date easy-to-follow 'for noobs" tutorial on setting up Eclipse and MinGW on Windows for absolute beginners that haven't ever before touched these types of tools

I wasn't able to find a useful tutorial for intermediate/advanced users from any date when I tried MinGW. I gave up and stuck with MSVC (the default compiler for windows since NT 3.1).

 

Quote

All I want to accomplish at the moment is to be able to painlessly run C++ code without any hassle regarding the IDE/compiler. 

Use Visual Studio. VS2017E is free to use, and it's generally considered easiest to use Microsoft tools when developing Windows Applications.
 

Link to post
Share on other sites

Download minGW and then Clion if you have a student email address and you are golden. Visual studio will force you to install all sorts of craps. Not to mention all the stuffs on there are Windows only. If you write a GUI application and uses win32, don't expect it to compile on platforms like macOS. If cross platform compatibility is an issue, DO NOT use visual studio and win32 APIs. 


Sudo make me a sandwich 

Link to post
Share on other sites
2 hours ago, wasab said:

Not to mention all the stuffs on there are Windows only

Visual studio is highly configurable:

 

https://blogs.msdn.microsoft.com/vcblog/2017/03/07/use-any-c-compiler-with-visual-studio/

 

But that doesn't solve the OPs problem. The op wants to write C++ natively in Windows, for Windows. The de facto method for doing so is to use VS and MSVC, and setting those tools up is as easy as checking "Install C++ desktop development tools" in the Visual Studio installer.

He clearly states:

Quote

All I want to accomplish at the moment is to be able to painlessly run C++ code without any hassle regarding the IDE/compiler. 

Using Visual Studio and MSVC is the way to do that on Windows.

Link to post
Share on other sites

As wasab said, get an educational version of CLion. It's cross platform and much nicer to use than Eclipse

Link to post
Share on other sites
8 hours ago, wasab said:

I cant run it on linux so useless. 

Which is totally irrelevant to the OP.

 

@Divergent2000 either get Clion with an educational license or Visual Studio 2017 Community Edition (or VS2019 preview if you like living on the edge).

Visual studio is not that bloated as some people here make it out to be.

The installer lets you select exactly what you need.

Also, if you are only interested in compiling single file projects then you can also just use a regular text editor and call the compiler (ie GCC or Clang) from the command line.


Desktop: Corsair RM550x | Ryzen R7 2700X | Corsair H100i (NF-F12 fans) | MSI GTX 1080 | 16GB 3000MHz memory | Asus X470-F Gaming | Samsung 970 EVO | Samsung 830 256GB SSD | 3TB HDD | Corsair 450D | MG279Q

Laptop: XPS15 9560 4K / 512GB

Console: Playstation 4 Pro

Link to post
Share on other sites

How about Qt Creator? A nice cross-platform IDE, installs (checkbox) MinGW GCC on Windows and you're off to the races


Current rig: i7-5820K, R5E, 1070ti (windows), Radeon HD7850 (Mac), a bunch of SSDs and HDDs, running MacOS Mojave, Windows 10 + a bunch of debian servers on Proxmox KVM hypervisor

Laptop: MacBook Pro 13" 2017

 

Previous projects: Razmac G5, Server, zenbox HTPC

 

See my GitHub profile!

A coder/modder from Finland

Link to post
Share on other sites
On 2/12/2019 at 1:11 PM, kendoka said:

Visual Studio is good, but it is an overkill for a beginner.

Plus: https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2017-system-requirements-vs

 

Except that for a typical C++ installation it uses under 7GB (6.75GB for VS2019 without Live Share support) .

That also includes stuff like the compiler, profiler and CMake.

So it's actually not bloated at all and many things can be disabled in the installer if you don't need them.

 

It's perfect for a beginner because it includes everything you need so you can start working with it out-of-the-box (no hassle with installing MinGW which might contain an outdated version of GCC which requires you to compile GCC from source to get C++17 to work properly).


Desktop: Corsair RM550x | Ryzen R7 2700X | Corsair H100i (NF-F12 fans) | MSI GTX 1080 | 16GB 3000MHz memory | Asus X470-F Gaming | Samsung 970 EVO | Samsung 830 256GB SSD | 3TB HDD | Corsair 450D | MG279Q

Laptop: XPS15 9560 4K / 512GB

Console: Playstation 4 Pro

Link to post
Share on other sites
Quote

Except that for a typical C++ installation it uses under 7GB (6.75GB for VS2019 without Live Share support) . That also includes stuff like the compiler, profiler and CMake.

I was talking VS17, yes it contains  everything  but even too much for a person trying  to get into programming. Basically 70% of stuff on visual studio will be confusing  people  to some point, won't  be used and will be in the way :/

Link to post
Share on other sites
4 hours ago, kendoka said:

I was talking VS17, yes it contains  everything  but even too much for a person trying  to get into programming. Basically 70% of stuff on visual studio will be confusing  people  to some point, won't  be used and will be in the way :/

I just have to say, I have found VS to be, by far, the least confusing and the easiest to use IDE ever, and I've also used a few of the JetBrains IDEs. The only toolchain that I've found comparable in ease would be the classic VIM and GCC/G++ combination, but even that has a fairly steep learning curve for someone unfamiliar with VIM.

I would suggest that we stop Microsoft bashing and help OP with the question, which was:

Quote

All I want to accomplish at the moment is to be able to painlessly run C++ code without any hassle regarding the IDE/compiler. 

The question didn't mention anything about needing to be small, or portable, or how much OP hates big bad Microsoft.

So, in light of that, I still believe that the best option is for @Divergent2000 to install Visual Studio 2017 Community and check the C++ development option in the installer. If OP needs it to be a small install, he can simply deselect all of the .NET stuff and not worry about having C# functionality.

 

There is simply no other IDE with the sheer amount of development effort and quality, documentation, and community support as Visual Studio, and whether you, as a developer with some experience, would currently choose that or not, it is clearly the best solution to OP's problem of finding easy to reach C++ development on Windows.
 

Link to post
Share on other sites
On 2/15/2019 at 8:29 AM, kendoka said:

I was talking VS17, yes it contains  everything  but even too much for a person trying  to get into programming. Basically 70% of stuff on visual studio will be confusing  people  to some point, won't  be used and will be in the way :/

Just checked: my VS2017 installation folder (C:/Program Files (x86)/Microsoft Visual Studio/2017) has a size of a "whopping" 2.34GB.

I assume that this does not include the Windows SDK itself but its size clearly doesn't deviate much from VS2019.

I think you are confused with VS2015 where you had to install everything at once.

Since VS2017 you can use the installer to select what features you want (everything is deselected by default) and for just a C++ installation you only need a couple GB.

 

And like @straight_stewie said, VS2017 is the easiest C++ environment to set up and use.

Also, Visual Studio has some features that are just plain better than any of its competitors (Intellisense).


Desktop: Corsair RM550x | Ryzen R7 2700X | Corsair H100i (NF-F12 fans) | MSI GTX 1080 | 16GB 3000MHz memory | Asus X470-F Gaming | Samsung 970 EVO | Samsung 830 256GB SSD | 3TB HDD | Corsair 450D | MG279Q

Laptop: XPS15 9560 4K / 512GB

Console: Playstation 4 Pro

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×