#1 Members - Reputation: 125
Posted 18 July 2012 - 11:34 AM
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.
#2 Members - Reputation: 3709
Posted 18 July 2012 - 11:44 AM
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.
The voices in my head may not be real, but they have some good ideas!
#3 Members - Reputation: 521
Posted 18 July 2012 - 11:50 AM
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.
#5 Members - Reputation: 125
Posted 18 July 2012 - 05:15 PM
Is there really no way to hard code the path to an "include" library?You'll still have to deal with the linker which is the cause of your IDE problems
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.since crashes caused by Module X can appear to occur in function Y
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?For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.
#6 Members - Reputation: 271
Posted 18 July 2012 - 05:25 PM
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?
For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.
Notepad++ is not an IDE it is source code editor.
#7 Crossbones+ - Reputation: 1011
Posted 18 July 2012 - 05:29 PM
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.
#8 Members - Reputation: 3709
Posted 18 July 2012 - 06:04 PM
Is there really no way to hard code the path to an "include" library?
You'll still have to deal with the linker which is the cause of your IDE problems
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)
The voices in my head may not be real, but they have some good ideas!
#9 Members - Reputation: 210
Posted 18 July 2012 - 06:13 PM
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?
For quick and dirty solutions I use vc10 from the commandline and notepad++ as the editor.
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
#10 Members - Reputation: 2750
Posted 18 July 2012 - 07:11 PM
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.
#11 Crossbones+ - Reputation: 1011
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.
#12 Members - Reputation: 125
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.
#13 Members - Reputation: 1307
Posted 19 July 2012 - 01:01 AM
- 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++?
Edited by kunos, 19 July 2012 - 01:05 AM.
#14 Members - Reputation: 601
Posted 19 July 2012 - 02:21 AM
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.
#15 Members - Reputation: 740
Posted 19 July 2012 - 02:51 AM
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.
#16 Crossbones+ - Reputation: 1011
Posted 19 July 2012 - 03:06 AM
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.
#17 Members - Reputation: 117
Posted 19 July 2012 - 03:51 AM
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.
#18 Members - Reputation: 125
Posted 19 July 2012 - 09:36 AM
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.
#19 Members - Reputation: 3283
Posted 19 July 2012 - 09:39 AM
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.
#20 Moderators - Reputation: 3967
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.






