• Create Account

# Can I avoid the hassle of these IDE's?

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

39 replies to this topic

### #1Krik  Members   -  Reputation: 125

Like
1Likes
Like

Posted 18 July 2012 - 11:34 AM

Likely someone is going to look at me side ways, I may even get my head knocked off and handed back to me, but I have to ask.

I am getting tired of fighting IDE's. Everything from the frameworks not being found (even though it is installed and works with other programs) to having to track down some obscure setting. Or a library file needing to be "linked", sometimes in more than one spot. And all compounded by poor documentation, or what is there is missing some key note. When did programing turn into something sort of using AutoCAD. I want to type (well copy, paste at least) and solve impossible coding dilemmas, not change settings on poorly constructed software.

I build PHP based web apps for a living, while the PHP does some of the heavy lifting, it is almost night and day when it comes to dealing with IDE's for writing code in C++. PHP can be done in a text editor (obviously a bit nicer one is good), and with that text editor I can include "library" files, pass data to and from other programing languages (MySQL, XML, Javascript, etc), make graphics, create files, ect. Also, as showing the server generated error messages to the user is not preferred, I build my own error handling, which during development can be used to provide additional debugging info. And all that can be done without touching any software settings.

Now obviously a compiler is needed for C++ but after that why on earth do I have to leap tall buildings to get an IDE to work with C++. It seems to me one could write C++ in a text editor. Build your own error handling and debugging "library" and run it in a simple compiler. Or maybe these IDE's have finial driven me to looney bin.On top of all that, what is more disconcerting is I know Microsoft. It can be just about guaranteed that upgrading to the next version of Visual Studio will be about the same as having to buy your first copy of Visual Studio, hours and maybe even days learning how to just make your first "hello world" compile.

If it is possible to use a text editor and a compiler to do C++, please I'll read a 10,000 page tutorial over keep on fighting these IDE's. It would seem to me it's possible, just most rely on the IDE to take care of certain things that could likely be done fairly simply in one's code or with an additional library file.

Funny thing is PHP is written in C and C++ if it were all a C++ lib or .h files man would it make things easy on me (hmm, I wonder???), barring the linking thing that is.

### #2SimonForsman  Crossbones+   -  Reputation: 4810

Like
1Likes
Like

Posted 18 July 2012 - 11:44 AM

Ofcourse you can use a text editor and a compiler with C++, its just a pain in the ass to do so since the C++ build model is FUBAR (You'll still have to deal with the linker which is the cause of your IDE problems) and since the language is pretty much FUBAR aswell you need a really good debugger to actually figure out what is wrong from time to time (since crashes caused by Module X can appear to occur in function Y in the completely unrelated Module Z simply printing "debug" information to stderr or stdout isn't always enough).

For the commandline approach you could go with gcc, gdb, your favourite text editor and something like make or cmake but it really won't be any easier.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

### #3Rld_  Members   -  Reputation: 768

Like
2Likes
Like

Posted 18 July 2012 - 11:50 AM

Not an expert on the topic, but perhaps you can take a look at GNU. I don't know any specific details on the matter (and I might completely hit the bat in the wrong direction here!!!) but as far as I know, you can just get your favorite text editor and compile your stuff with the GNU compiler (GCC or something) but with the options there you will most likely still be learning stuff that would almost feel the same as having an IDE.

I personally never had any trouble with VS and although the migration from 2008/2009 to 2010 took me some time (more in wanting to than having problems with it), the difference wasn't all that big and having read where similar options were, I didn't have any problems at all.

When it comes to linking and such, it's really not that hard. There is only perhaps the annoyance of not having a third party installed, but that might just take a little of your time to fix.

### #4Fredericvo  Members   -  Reputation: 210

Like
0Likes
Like

Posted 18 July 2012 - 12:07 PM

For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.

### #5Krik  Members   -  Reputation: 125

Like
0Likes
Like

Posted 18 July 2012 - 05:15 PM

You'll still have to deal with the linker which is the cause of your IDE problems

Is there really no way to hard code the path to an "include" library?

since crashes caused by Module X can appear to occur in function Y

That happens a fair amount when working with objects oriented programing in PHP. I have had to many times work my backwords through classes trying to catch exceptions, so thats nothing really unusual to myself. That is one thing nice about PHP a good "var_dump" can output the entire object and you can see if you're calling the information you need correctly and if the information is making its way to where it should be in the object. Of course some IDE's have an object browser not entirely sure how it compares with "var_dump", seems to have some info anyway. Have thought about building a var_dump equivilent for c++, based on what I have read, not an easy prospect to say the least.

For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.

Notepad++ is my prefered IDE for building web apps currently. I assume vc10 is Visual Studio 10, is there a good tutorial or documentation on using it from the command line?

### #6TMKCodes  Members   -  Reputation: 271

Like
1Likes
Like

Posted 18 July 2012 - 05:25 PM

For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.

Notepad++ is my prefered IDE for building web apps currently. I assume vc10 is Visual Studio 10, is there a good tutorial or documentation on using it from the command line?

Notepad++ is not an IDE it is source code editor.

### #7Dragonsoulj  Crossbones+   -  Reputation: 1758

Like
0Likes
Like

Posted 18 July 2012 - 05:29 PM

I personally do not care for using IDEs most of the time. Granted, I don't have massive projects to compile and sort through. My usual setup is using Notepad++ and GCC/G++ on Windows and GEdit and GCC/G++ on Linux. (Notepad++ does work just fine on Linux through Wine.) I tend to use SFML to make my programs, and my linking looks something like this (I don't use CMake, which could help you with hard coding the paths):

g++ -O Program.exe main.cpp someClass.H someClass.cpp -lsfml-graphics -lsfml-window -lsfml-system

Graphics library, Window library, and System library. A lot of the linkage is that simple. I've done C++ and OpenGL for school and used about as many linkers. If you don't want to look into CMake, just make a batch file that saves the libraries you link to and just add the extra files. Then you go to the command line where the batch file is, type "Compile" or "Compile.bat" and it runs the same. This could handle that include issue you have and wanting them to be hard coded as well.

### #8SimonForsman  Crossbones+   -  Reputation: 4810

Like
2Likes
Like

Posted 18 July 2012 - 06:04 PM

You'll still have to deal with the linker which is the cause of your IDE problems

Is there really no way to hard code the path to an "include" library?

include libraries are easy, just drop the .h and .cpp files in your project folder and do #include "filename.h"

the annoying part that makes C++ a bit special are the pre-compiled libraries, you could just drop these in your project folder aswell, or add the library path and library in your IDE.

If you look at dragonsouljs post you see that -lsfml-graphics etc at the end of his g++ command, that is linker directives telling the linker which libraries to use,
in his case however those libraries must be in the library path which, on Windows is a pain in the ass. (in Linux its easy as libraries are automatically installed in the correct location by the package manager)

To properly set up libraries for use with for example visual studio you have to do 2 things:

1) tell visual studio where to find your libraries (unless you installed the library in visual studios lib folder or your projects lib folder)
2) tell visual studio which libraries to link against, (for sfml as in dragonsouljs example it would be sfml-graphics, sfml-window and sfml-system)
For visual studio (and most other IDEs) this is done in the linker section of the project settings and only has to be done once per project. (You can also set default locations for all projects if you have commonly used libraries)

Things like make have the advantage that you can add custom build steps, (for example, make can also convert your fbx models to your engines internal format if you got a tool for it) and it only runs the steps specified for a given file if that file, or one of its dependencies have changed (Which reduces buildtime for large projects) (Visual studio and other IDEs also only compile things that have changed unless you tell them to rebuild everything, but custom build steps are generally a bit more painful to get working)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

### #9Fredericvo  Members   -  Reputation: 210

Like
0Likes
Like

Posted 18 July 2012 - 06:13 PM

For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.

Notepad++ is my prefered IDE for building web apps currently. I assume vc10 is Visual Studio 10, is there a good tutorial or documentation on using it from the command line?

It's my preferred source code editor too. I'm not aware of tutorials on the CMD-line for visual studio 2010 but I figured it all on my own. I can't say it all from my head but it all boiled down to the vcvars32.bat file to set up env variables and creating a shortcut to that file such as to quickly fire it from your desktop rather than have to open a normal CMD, navigate all the way to where vcvars32.bat lies, running it and then go to where your source code is (cd here cd there lol) but if I remember there was a trick to keep the CMD window open otherwise if you have a shortcut to a bat it runs and closes. I could post it later if you want when I'm on my pc.

As far as using it it's simply typing CL main.cpp source2.cpp source3.cpp etc
however you may want optimisations then add /O2 before main.cpp

### #10Ravyne  Crossbones+   -  Reputation: 4107

Like
0Likes
Like

Posted 18 July 2012 - 07:11 PM

You can generally go either IDE or Text Editor + Make (or equivalent) for C++.

My advice is to just learn to configure your IDE -- in essence its no different than configuring your system or shell environment (I doubt you'd prefer to provide the full path of a dozen dependencies manually). You just sound frustrated for the sake of being frustrated. Once you set up the dependency in your IDE's project/solution file (or globally, as appropriate), you should be good to go.

I suspect your frustrations are more due to the build model than the IDE itself, as someone else already opined, so going all command-line commando probably isn't going to make your life magically easier.

### #11Dragonsoulj  Crossbones+   -  Reputation: 1758

Like
0Likes
Like

Posted 18 July 2012 - 07:56 PM

in his case however those libraries must be in the library path which, on Windows is a pain in the ass.

SFML contains the same directory structure as my compiler. Copy + Paste -> Merge. Since the compiler already looks in the include/lib directories, there isn't much of a problem. I believe a few other libraries I've used also followed the similar structure.

### #12Krik  Members   -  Reputation: 125

Like
0Likes
Like

Posted 18 July 2012 - 10:19 PM

If you don't want to look into CMake, just make a batch file that saves the libraries you link to and just add the extra files. Then you go to the command line where the batch file is, type "Compile" or "Compile.bat" and it runs the same. This could handle that include issue you have and wanting them to be hard coded as well.

I've seen CMake referred to in some of my other research, may take a look at it. I have to ask, are these batch files anything like the old school batch files from the Windows 3.1, 95 and 98 days? If so I just need to remember how to work with them again and I am set.

so going all command-line commando probably isn't going to make your life magically easier.

Actually I don't mind command line, I come form the old days of DOS and Windows 3.1, when to setup new software required that you knew how to use command line. I still on occasion use command line to fix PC's that won't boot to windows. I also worked with Linux back in the 1990's, when it was still very much a command line based OS. I even remember using an 8086 PC (and no that is not is MHz) from the early 1980's, you had to use the command line to configure the print drivers. My programing experience goes back to writing code in Q-Basic, so command line and bat files were at one point old hat for me. I would rather edit ini, bat, dat, and now xml files than try to figure out where some software is hiding some setting. It amazes me how often after using some piece of software for several years I learn it has features I have been wanting for almost as long as I have had the software. If I had been able to look at a configuration file I likely would have spotted it much sooner, you should have seen what I did with Windows 3.1.

If I can use batch files like Dragonsoulj is suggesting this may solve much of my headaches. I would much rather type code than learn to use some poorly made software.

Also one other thing I ran into while doing my own research was "Preprocessor Directives". I am not sure if there is anything of use in them but they do look to have some potential. Its funny how all the programing books and tutorials just completely skip over these, even though they are used (#include, #define, #pragma, and several others). I am temped to call it the "IDE effect", if it is all taken care of for you why go into any detail of learning how it works.

### #13kunos  Crossbones+   -  Reputation: 1765

Like
5Likes
Like

Posted 19 July 2012 - 01:01 AM

Not using an IDE might (arguably) make compile Hello World a bit more easy but, in the long run, it's your loss. You'll loose things that are essential for modern day development and productivity, such as:

- Intellisense/Code Completion. This will basically allow you to keep your mind on the problem you are trying to solve instead of helplessly browsing through .h files or broken documentations trying to remember what was the 7th parameter to function XX. In other words, more time spent solving problems than fighting the language.

- Code browsing. Project management, automatic dependency management, jump to definition, find all references, refactoring. All these are not important until you work on something serious. People that dismiss the importance of these are probably writing Hello World and guess the number game over and over again.

- Debugging. Visual Studio has the best debugger available for C++. If you loose VS, you loose that too. Again, not a big deal if you're writing Hello World. Pretty big deal if you have a big application crashing somewhere in your 100k lines of code... ya sure, you can printf and divide and conquer

- Integrated documentation. Cant remember what is this thing supposed to do? Click on the word, F1, tada! Here's the doc for it.

In short, ya, you can do it cavemen style if you want, just club her on the head and go on... or, you can get smarter, take your time learning VS (which btw, is REALLY easy, if you cant make VS work how on earth will you manage learning something like C++? ) and get a whole lot of awesomeness in return, and you'll live longer

Edited by kunos, 19 July 2012 - 01:05 AM.

Stefano Casillo
AssettoCorsa - netKar PRO - Kunos Simulazioni

### #14saejox  Members   -  Reputation: 714

Like
0Likes
Like

Posted 19 July 2012 - 02:21 AM

IDEs are there to lift some of the hassle of working with c++

look at Cmake,
you write includes paths, libraries etc... a text editor.
Cmake generates you projects. it can generate CodeBlocks project, gcc make, Visual Studio project, etc...
it is much easier if you work with multiple environments.

### #15rnlf  Members   -  Reputation: 965

Like
0Likes
Like

Posted 19 July 2012 - 02:51 AM

I am actually nothing but vim, cmake, gdb and a lot of command line tools as my IDE. Once you know how to operate those, you will most likely miss nothing from a full blown IDE. At least I don't, but usually, such a claim provokes other people to tell me I'm wrong. So 3, 2, 1, ...

Using CMake also has the advantage that you don't exclude people from working on your project who need an IDE. Also your code gets quite portable if you take care to write clean CMakeLists.

my blog (German)

### #16Dragonsoulj  Crossbones+   -  Reputation: 1758

Like
0Likes
Like

Posted 19 July 2012 - 03:06 AM

Those batch files I mentioned are the old batch files, the .bat files. Since you can compile from the command line, why not just make a simple command you call every time you need to compile/recompile something? You can compile projects through the command line no matter the size, the only trouble is what kunos mentioned: You lose the benefits an IDE can add (although to be fair, debugging tools are available without an IDE attached, open a browser, type a quick function in, and you have your documentation). You will miss out on the project management, but if you handle your file/folder hierarchy right, you shouldn't have much of a problem. The code completion/intellisense is about all you would truly lack, but in some cases I find that makes people rather lazy programmers, and potentially introduces bugs from picking the wrong item out of the list.

If you still miss the terminal Linux, just get a copy of Ubuntu and ALT+CTRL+F1 or so and solely use the terminal. Usually my F6 or F7 is the only one with X Server started.

### #17FredOrJoeBloggs  Members   -  Reputation: 117

Like
0Likes
Like

Posted 19 July 2012 - 03:51 AM

I know what you mean.
Until the last 12 months I have always used Visual Studio 6 to 2010 for C++ and its always been really simple and easy. At work we team it up with Scons and don't have an issue, at home I spend and extra 5 minutes getting the settings right before I start doing too much.
Then I started with PHP. It was an absolute nightmare. Like you said editing the code was easy, but getting it to run was a nightmare.
Java was worse still, Netbean might well be a great tool, but its totally alien to me, all the shortcut keys are 'wrong'.
IDEs are meant to make things easier, but if they don't then don't use them. You can use Visual Studio from the command line, or you can call the compiler and linker directly, but I think it will get a bit teadious to keep doing it all manually every time, so get a 'make' like tool or script. But is learning how to configure a make tool that much different to learning how to use an IDE in the first place.

### #18Krik  Members   -  Reputation: 125

Like
0Likes
Like

Posted 19 July 2012 - 09:36 AM

Yea, Visual Studio would make my life easier if I could get it to work, to start with. I have tried everything I can find to get it to work. And after a couple reinstalls it is looking on drive d for the MSBuld which without it won't even let you start a new project, I solved that by moving MSBuild to drive D. But then it cannot find .NET Framework 4.0 even though I have confirmed it is installed and working. To solve this requires I add a line to the .vcxproj files in every project to look to version 3.5 and then edit "Platform Tools" (I think thats what its called, can't recall were the setting is, at the moment) from v90 to v100. And this has to be done with every project both new and imported. So right now I look at a lot of example code and it takes a fair amount of time just to see how someone elses code works. And even after all that there is still a bug that randomly shows up, when I go to debug, I get a compile error that has some long negative (-) number, which I accidentally found I just need to exit Visual Studio and restart, and everything will work again. And oh and then there is the fact that all this some how is causing it to think my projects are out of date so every time I run the debugging it asks if I still what to compile the project.

Visual Studio will making my life easier??? Its been a week getting it to work so not from where I am standing, it has made my life more difficult. In reality Eclipse is easier and it requires that you figure out how to configure MinGW to work with it, and even then the Debugging is very awkward to work with. I am half inclined to use Eclispe but I have yet to find a tutorial on how to get 3rd party libraries to work with it. Of course I may have given up on that bit early as the hassle with Visual Studio has me quite put out with IDE's. I have tried using Eclipse in the past with PHP and it had some idiosyncrasies that made it awkward to use so I am not set on making it work either.

Found a tutorial on makefiles http://oreilly.com/c.../book/index.csp and I am also looking at GNU's documentation http://www.gnu.org/s...node/index.html. Probably a little later I will be figuring out how to use CMake.

I guess if I find building my own makefiles and batch files some how horrible difficult (which right now is not looking to be the case) I will give Visual Studio another shot. But to do that will require I wipe my C drive and reinstall, which for the way I like things Windows 7 needs heavy modification to work, half, right and reinstalling everything takes the better part of day to get done, and not one I look forward to.

Edited by Krik, 19 July 2012 - 09:41 AM.

### #19Serapth  Crossbones+   -  Reputation: 4190

Like
8Likes
Like

Posted 19 July 2012 - 09:39 AM

Your machine is heavily broken and all your fixes are only going to make your life worse. Visual Studio 2010 works with MSBuild 4.0, and shoehorning in 3.5 is just asking for trouble.

Visual Studio is as close as it comes to "It just works" as development tools get, especially one of it's complexity. It sounds like you have a bad .NET install. I would uninstall everything and reinstall Visual Studio from scratch.

Edited by Serapth, 19 July 2012 - 09:40 AM.

My more Popular Tutorial Series:

### #20phantom  Moderators   -  Reputation: 5027

Like
3Likes
Like

Posted 19 July 2012 - 09:46 AM

Your machine is heavily broken and all your fixes are only going to make your life worse.

This.

My experiance with Visual Studio;
- install
- update (via Window built in updater this time as I'm on a fresh install)
- create project and go

Adding libraries and header files per project is just as easy (I tend to keep them out of my VS install; this time they are all going into an 'SDKs' dir on a different drive). About the only thing in VS2010 which was a bit 'eh?' was the moving of the global include and lib folders but once you know where they are (quick google) its hardly a problem either.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS