From: Robert H. <Rob...@gm...> - 2011-11-30 20:57:17
|
Hi LRN, Hi, Am 28.11.2011 17:56, schrieb LRN: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 28.11.2011 18:49, Solomon Eraut wrote: >> It seems like learning a programming language is going to take > thousands of hours, so every time there's another detour that could > take a thousand hours itself, and it wasn't something I CHOSE to > invest time in, I cut it short to an hour if I can. And most of the time, you are sitting in front of you computer and just wait, that it does what you want... - or you wait until you are knowing how to tell the computer in the right way what you want ... In our computer science lesson I waited about 5 minutes for the ending of an automatical started skript started by our pool-administrator ... I could only say to the people, well here you can see - most time you are waiting until something ends :-) (Now switching for two sentences into German: Steffen, wenn du das zufällig mit liest, das obige sollte keine Herabsetzung deiner Fähigkeit sein. Aber der automatische Zeitpunkt war ... ähm .. etwas ungünstig :-) ) > As others have pointed out, you need an IDE, which will provide a > practically single-click (well, a few-click, maybe) solution for > software building. Well for beginners I think, an "simple" one click enviroment is the best way to concentrate on language syntax. But up to now I don't have found any IDE, which is simple as I like and powerfull as I need. [...] > Give `Code::Blocks' a try, or maybe `DevC++'. Maybe Eclipse (not sure > if it can use MinGW toolset). Haven't been using IDEs for a while, so > can't really help you to choose. Well in an earlier Version of DevC++ I tried to link against a selve written lib/dll but it wasn't possible for me to make DevC++ accepting the name of the file ... But as I had found the right command for starting g++ in cmd outof DevC++ there was no problem with my code. In our computer science lessons we use Eclipse for teaching Java. And I use Eclipse with CDT-plugin to invoke MinGW-Toolset. It is possible to use QT-plugin for Eclipse with MinGW. For beginners I think Eclipse is too powerful (and sometimes to buggy depending on version). You should be told, that you need Java installed to run Eclipse. > You might also be able to find books or tutorials that explain not > only the C language, but also how to invoke compiler and linker, etc, > from command line. Sadly, i can't remember any. Well if you can understand German: http://www.oreilly.de/german/freebooks/rlinux3ger/ch132.html This chapter called "Programmieren mit gcc " that means "programming with gcc". Here you can see how to run the tools from commandline. > > Other problems you have: > > Editor - you can use any text editor. I prefer Far Manager, but > absolutely any editor will do, if it is capable of working with > UTF-8-encoded files (that is, Notepad, Wordpad, and office > applications are generally unsuitable for this). Well Notepad in WinXP can produce UTF-8 but you have to select it. MadEdit (SourceForge) is a nice editor which I use for programming, if I don't want to wait for starting Eclipse .... > Other places to invoke gcc from - technically, you can invoke gcc from > normal Windows command prompt (that is, assuming that you've added > mingw/bin directory to PATH, otherwise Windows won't be able to find > gcc; MSys shell initialization script does the PATH magic for you, You can set the Windows-environment variable PATH from console (cmd.exe) 1: localy) cmd.exe c:\> SET PATH=%PATH%;c:\mingw\bin;c:\mingw\lib c:\> gcc test.c -o test.exe skipping messages c:\> test.exe 2: globaly in WinXP) something like: Computer->Properties->advanced->Enviromentvariables (well that is a translation of the german lables in my german WindowsXP) than you can open cmd.exe and just using the compiler. If you want to write a box-stayd-open commandline programm, than you only must wait for a last user input :-) yes, it is not a clean solution, but the easiest and portablest and it is standard conform. But if you are writing a Windows-only programm, than you can have a look inside the Windows API. I think there must be a command for "let acutal windows open" or "don't close window after programm ending". or you can make a "systemcall" system("pause"); but that is not nice. Until resectly I hadn't MSYS installed, but I use MinGW over years. > In Msys shell you can use `make', outside of Msys shell (in Windows > shell) you can use `mingw32-make'. Or any other make implementation for windows. > And that will work just fine, until your project gets bigger, and > you'll realize that writing makefiles is tedious, and that juggling > the many compiler and linker options is mind-nubbing. At which point > you have a few options: > 1) Use IDE, because IDE often allows you to not to use makefiles. > 2) Use non-make building tools (`scons', `CMake', `ant', and so on) > 3) Use autotools, which is the traditional *nix way. And for autotools > you need MSys, because autotools require *nix shell (such as bash). > Considering the fact that LOTS of free/opensource programs, especially > the ones originating from *nix, use autotools, it means that compiling > them absolutely requires MSys shell. Which is kinda the point i've > been trying to make in this paragraph. So to answer your question: > yes, you can use gcc outside of MSys shell, as long as you're using > only [simple/pre-made] makefiles or non-make building tools, which do > not require MSys shell. .-) > > As i have said, learning the tools has little to do with programming. you are right. > > For the record, i've learned programming using IDEs (for Basic, > Pascal, and C), and only after that i've switched to using > command-line tools, like `gcc', `make', autotools and such. Just like me... Turbo Pascal (DOS), Borland Pascal (Windows)... C, C++, java and others on linux only commandline, textmode tools ( vi, mcedit ) And I now Eclipse or simple GUI-Editor. > Oh, and sending directly to the list is fine, that is exactly how it > is supposed to work. Best regards, Robert |