Jump to content
  • Advertisement
Sign in to follow this  
Krik

Can I avoid the hassle of these IDE's?

This topic is 2241 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Is there really no way to hard code the path to an "include" library?
[quote name='SimonForsman']
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.

[quote name='Fredericvo']
For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.
[/quote]
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?

Share this post


Link to post
Share on other sites

[quote name='Fredericvo']
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?
[/quote]

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

[quote name='SimonForsman']
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?
[/quote]

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)

Share this post


Link to post
Share on other sites



[quote name='Fredericvo']
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?
[/quote]

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!