Thank you very much TS! TT__TTXian Nox wrote:gcc. It's not installed or not in the path.N6v7d8 wrote:Is there something missing?
Most likely it's just not in your path, so here's how to add it to your path: Right click on My Computer --> Properties --> Advanced System Settings --> Environmental variables --> double click Path, and append the following:This is the path to your MinGW install, so if it's on a different path, change accordingly. Also, the Path shouldn't contain any spaces, and the different paths on it are separated by a semicolon.Code: Select all
;C:\MinGW\bin
Also, it's much easier to just select all in your console window, and use the code tag here to paste it. To do so, right click on the command prompt, click select, select what you want, then press Enter to copy it.
[Tutorial] Introduction to programming using C
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Forum rule Nº 15 is strictly enforced in this subforum.
Re: [Tutorial] Introduction to programming using C
Advertising
Re: [Tutorial] Introduction to programming using C
I Prefer AutoIt.
Advertising
- PSP Information
Re: [Tutorial] Introduction to programming using C
Huh? *Facepalm* Another typical Windows user that think he knows computers because he can use a GUI... Can you make an OS with AutoIt? Do you even know what an OS is? And FYI C is not (only) a scripting language. Inform yourself before saying such nonsense.
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: [Tutorial] Introduction to programming using C
And they say Windows is easy...Xian Nox wrote:Right click on My Computer --> Properties --> Advanced System Settings --> Environmental variables --> double click Path, and append the following:
Code: Select all
;C:\MinGW\bin
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
-
- Posts: 186
- Joined: Thu Jan 20, 2011 1:16 pm
- Location: Milky Way, Solar system, Earth, North America, Canada, Québec..... In front of my computer
Re: [Tutorial] Introduction to programming using C
And they say macintosh is easy...
On mac, not all standard program are available from command line. And from GUI, we can't change every setting. Mac = BSD, with lot of standard program we usually use removed, and from GUI, not many setting we can change, and some area of the directory hierarchy we can't even access even when we are root... So basically, Mac = complete desktop environment not very tweak-able, limiting end user's freedom to customize.
Only true OS are Unix(Excluding Mac) and GNU/Linux and GNU/Freebsd (Like Debian with BSD kernel). They are the only OS that allow user to do whatever they want with their OS(Especially with ArchLinux and Gentoo and Slackware, and most BSD).
I only tried Macintosh because it was a Unix, but was not happy.
Also, I found out that mac is not a good development environment. Fortunately, they keep GCC installed. But except that... bad integration with most of popular API, like GTK, because of X window... Some program not available, like HipHop PHP, a php compiler, is not available on mac. Because of the lack of customization, its also hard to make a server out of a mac, tweak every set up to get the maximum out of memory, disk access... We can not even boot in command line only, they impose us their horrible interface. And we can't use every programming language on mac. Also, most of the IDE either are not available, have bug, or just look horrible on mac (The look, it just don't fit well with the rest of the style of other window), so the only good IDE is Xcode, and I really don't like it.
Ok well, easy to shutdown, to power up, to log in, to open a internet browser, listen music, but beyond those, its not easy to do something more advanced out of a mac, so limited to basic task. But yeah, there is good program available for mac, like garage band, but beyond that, program not made by apple are not so good. Also, this happen quite often they break compatibility... From leopard to Snow leopard to Lion, happened so many time that program stopped working.
The only way to make good program on mac is by using objective-c, a horrible programming language. A language that only has use on Apple product. I won't learn that language that can't even be used on other system. Also, good luck with the file hierarchy, this is not even standardized... Library are not where they are suppose to be.
Trust us, you should go with a Linux Distribution or a BSD, and stop to pride windows, or mac.
For me, mac is a nerfed Unix. People think that mac is easier to use, but in reality, its not easier to use. A Linux distribution, well equipped (not a minimal installation) is easy as mac to use. It support almost all hardware with no need to install or configure driver, in most of the time. The desktop is clean, and its, in most of available distribution, ready to do programming.
Linux distribution I consider more easier to use than mac are: Ubuntu, Fedora, OpenSUSE, Linux Mint, Debian, Mandriva, Red Hat.
Many people say that Debian are for more intermediate user, but actually, i found out really easy to use. Equality with Ubuntu. I tried both, and I just can't find what is easier to use in Ubuntu. Its easy to use for normal user as long as you install a desktop environment. Else, its more for intermediate-advanced user.
Also, from what you already talked about AutoIt, we need to simulate keystroke and mouse click... Why complicate our life when we can simply make a call to another program to do the job or change a configuration file... In Perl and most other language, we simply make a shell command to use a program to do the job, and get the output. So much simpler to start/stop a server, than simulating keystroke...
On mac, not all standard program are available from command line. And from GUI, we can't change every setting. Mac = BSD, with lot of standard program we usually use removed, and from GUI, not many setting we can change, and some area of the directory hierarchy we can't even access even when we are root... So basically, Mac = complete desktop environment not very tweak-able, limiting end user's freedom to customize.
Only true OS are Unix(Excluding Mac) and GNU/Linux and GNU/Freebsd (Like Debian with BSD kernel). They are the only OS that allow user to do whatever they want with their OS(Especially with ArchLinux and Gentoo and Slackware, and most BSD).
I only tried Macintosh because it was a Unix, but was not happy.
Also, I found out that mac is not a good development environment. Fortunately, they keep GCC installed. But except that... bad integration with most of popular API, like GTK, because of X window... Some program not available, like HipHop PHP, a php compiler, is not available on mac. Because of the lack of customization, its also hard to make a server out of a mac, tweak every set up to get the maximum out of memory, disk access... We can not even boot in command line only, they impose us their horrible interface. And we can't use every programming language on mac. Also, most of the IDE either are not available, have bug, or just look horrible on mac (The look, it just don't fit well with the rest of the style of other window), so the only good IDE is Xcode, and I really don't like it.
Ok well, easy to shutdown, to power up, to log in, to open a internet browser, listen music, but beyond those, its not easy to do something more advanced out of a mac, so limited to basic task. But yeah, there is good program available for mac, like garage band, but beyond that, program not made by apple are not so good. Also, this happen quite often they break compatibility... From leopard to Snow leopard to Lion, happened so many time that program stopped working.
The only way to make good program on mac is by using objective-c, a horrible programming language. A language that only has use on Apple product. I won't learn that language that can't even be used on other system. Also, good luck with the file hierarchy, this is not even standardized... Library are not where they are suppose to be.
Trust us, you should go with a Linux Distribution or a BSD, and stop to pride windows, or mac.
For me, mac is a nerfed Unix. People think that mac is easier to use, but in reality, its not easier to use. A Linux distribution, well equipped (not a minimal installation) is easy as mac to use. It support almost all hardware with no need to install or configure driver, in most of the time. The desktop is clean, and its, in most of available distribution, ready to do programming.
Linux distribution I consider more easier to use than mac are: Ubuntu, Fedora, OpenSUSE, Linux Mint, Debian, Mandriva, Red Hat.
Many people say that Debian are for more intermediate user, but actually, i found out really easy to use. Equality with Ubuntu. I tried both, and I just can't find what is easier to use in Ubuntu. Its easy to use for normal user as long as you install a desktop environment. Else, its more for intermediate-advanced user.
Also, from what you already talked about AutoIt, we need to simulate keystroke and mouse click... Why complicate our life when we can simply make a call to another program to do the job or change a configuration file... In Perl and most other language, we simply make a shell command to use a program to do the job, and get the output. So much simpler to start/stop a server, than simulating keystroke...
Re: [Tutorial] Introduction to programming using C
Hi there, I'm having some issues with this and was hoping that someone would be kind enough to help me out? I installed Ubuntu to easier follow these tutorials, and some others I've found online, but I'm not experienced with it, at all and I'm running into some errors.
I installed the Build-Essential thing just fine through the Ubuntu Software Center, however, when I type CC into the Terminal as the tutorial states, I get this issue:
I also tried to use the apt-get install build-essential, and wouldn't work, giving me this error:
So I logged in as root, and it simply updated the files I'd already downloaded from the Software Center, however again, CC gave the same error, so I assumed this would be okay, as the tutorial stated "no input files".
I moved on to writing the text into my text editor (using GEDIT) and saved it as foo.c, however I noticed that there was no temp$ folder, so I created one, and saved it into there. However, when compiling I got this:
I did attempt to make different directories (such as desktop then used ~/desktop), however I got the same issue while compiling. Okay, so that tells me nothing about whether or not it has compiled, but I guessed it would work, so I continued and recieved this:
Now from my understanding, it should print the text from the foo.c file in the terminal, rather than just telling me it's a directory.
What am I doing wrong here?
I installed the Build-Essential thing just fine through the Ubuntu Software Center, however, when I type CC into the Terminal as the tutorial states, I get this issue:
Code: Select all
tonakai@Tonakai:~$ cc
cc: fatal error: no input files
compilation terminated.
Code: Select all
tonakai@Tonakai:~$ apt-get install build-essential
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I moved on to writing the text into my text editor (using GEDIT) and saved it as foo.c, however I noticed that there was no temp$ folder, so I created one, and saved it into there. However, when compiling I got this:
Code: Select all
tonakai@Tonakai:~$ ~/temp$ cc -o foo foo.c
bash: /home/tonakai/temp$: Is a directory
Code: Select all
tonakai@Tonakai:~$ ~/temp$ ./foo
bash: /home/tonakai/temp$: Is a directory
What am I doing wrong here?
-
- Guru
- Posts: 2874
- Joined: Sat Apr 21, 2012 1:23 pm
- Location: The North Pole
Re: [Tutorial] Introduction to programming using C
Hi Tonakai.
The "no input file" error is okay, it means that the compiler is installed.
In the terminal cd into the directory that you want to make your files, once you are there type into the terminal
write in your code there then save it and exit gedit.
In the terminal type this,
If there are no errors then your code was successfully compiled.
Now type this in the terminal, You should see your code executed in the terminal.
The "no input file" error is okay, it means that the compiler is installed.
In the terminal cd into the directory that you want to make your files, once you are there type into the terminal
Code: Select all
gedit foo.c
In the terminal type this,
Code: Select all
cc -o foo foo.c
Now type this in the terminal,
Code: Select all
./foo
PSP 2001 - TA-085 - 6.61 PRO-C2
PS Vita 3G - PCH-1101 - 3.65 HENkaku Ensō
Alcatel phone - Android 8.1.0
Laptop - Toshiba Satellite L305D-S5974 - Ubuntu 16.04 LTS
PS Vita 3G - PCH-1101 - 3.65 HENkaku Ensō
Alcatel phone - Android 8.1.0
Laptop - Toshiba Satellite L305D-S5974 - Ubuntu 16.04 LTS
Re: [Tutorial] Introduction to programming using C
Hey quikrazor, thank you very much for your quick response. Got it working now, thanks!
Re: [Tutorial] Introduction to programming using C
There's no such standard.asgard20032 wrote:On mac, not all standard program are available from command line.
This is also true for all other OS.asgard20032 wrote:And from GUI, we can't change every setting.
Better: Mac is BSD-based. BSD defines nothing about command line commands or GUI.asgard20032 wrote:Mac = BSD
Each OS can offer a different set of experiences, and developers choose what they want to offer. Apple doesn't want to offer an OS that can do everything.asgard20032 wrote:They are the only OS that allow user to do whatever they want with their OS
This is also true for all other OS.asgard20032 wrote:Some program not available
Mac is not meant to be a server, so if you want a server, use another OS or virtualize it.asgard20032 wrote:its also hard to make a server out of a mac
Example?asgard20032 wrote:And we can't use every programming language on mac
This is what Apple wants, it's not a problem for them. They know most people that use Mac are not developers.asgard20032 wrote:its not easy to do something more advanced out of a mac, so limited to basic task
This is more your opinion than a fact.asgard20032 wrote:objective-c, a horrible programming language
Because they invented it. Like .Net on Windows.asgard20032 wrote:A language that only has use on Apple product.
I don't understand. GCC compiles Objective-C.asgard20032 wrote:I won't learn that language that can't even be used on other system.
There's no such standard.asgard20032 wrote:good luck with the file hierarchy, this is not even standardized...
I don't understand. Where are they supposed to be?asgard20032 wrote:Library are not where they are suppose to be.
I totally agree on thisasgard20032 wrote:you should go with a Linux Distribution or a BSD
Not true. E.g. Ubuntu does not install build-essentials by default.asgard20032 wrote:in most of available distribution, ready to do programming
This is because Debian, as any other long living distro, was hard to use at first (like all other distros).asgard20032 wrote:Many people say that Debian are for more intermediate user
Ubuntu is based on Debian.asgard20032 wrote:Equality with Ubuntu.
@Tonakai: glad you solved your problems
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
-
- Retired Mod
- Posts: 3100
- Joined: Tue May 01, 2012 11:32 am
- Location: Behind you!
Re: [Tutorial] Introduction to programming using C
he does have a point, just sayingm0skit0 wrote:This is more your opinion than a fact.asgard20032 wrote:objective-c, a horrible programming language
I'm not sure but I think build-essentials is in fact inside the disc, but not installed by default (this was true for 7.10, I don't know the others)Ubuntu does not install build-essentials by default.
any operating system targeting desktop users can be for beginners, intermediate and advanced, it mostly depends on what you use the system forasgard20032 wrote:Many people say that Debian are for more intermediate user
I agree that I disagree on disagreeing with youm0skit0 wrote:I totally agree on thisasgard20032 wrote:you should go with a Linux Distribution or a BSD