Guys... I need help with this damn compiler!

Well. I'm running Win10 so let's go:
I wanted to test some of my simple c language programs.
Installed mingw32 and downloaded gcc-compiler and it's library's.
The problem i'm running in, how tf do I execute it?

I mean, everything is okay but that crap gives me problems! I'm really lost so help would be appreaciated @_@

[I don't want to modify environement path for reasons, last time i tried that it didn't go well]
And before you get too excited: No, i'm not able to code shit in C. I'm just a small, starting user. I downloaded a book off internet which is very user friendly so far so...

Also, self-motivation is cool! I want to code at all cost.
  • Like
Reactions: 1 person

Comments

@Felek666 Nobody is trying to make you an OS elitist, all they're doing [in my opinion] is recommending Linux as a development Operating System for what you are doing.
 
  • Like
Reactions: 3 people
F
I myself use Windows for many years now and it always been more user-friendly and overally everything worked as it should. Also, i can customize it to my liking.
I only run Linux VMs from time-to-time when I need to play around without messing up my actual PC.
@shadowfied And please refrain from insults since insultings me will do nothing. Yes, quoting that 'for little piece of shits like you'
 
  • Like
Reactions: 1 person
F
@TheKingy34 Then how i should feel about endless 'install linux, windows is spyware yada yada' shit on here?
You could just say for example, just set up a VM or Install it once. Not twice, not thrice.
Not basically "wipe windows" stuff I see on here.
 
F
Visual Studio works like that? Amazing.
Well I guess i'll stick with that for now @CuriousTommy
 
V
Visual Studio is like satanism.
But you don't have to sell your soul to be a satanist :^)

Modifying PATH is the easiest. Glad I don't have to do that on Loonix anymore. But the app you downloaded should have automatically added itself to PATH?

@Shadowfied You know what's faster than typing in commands? Using Arch-Anywhere B-)

(also what shadow is doing isn't being edgy, by the way)
 
  • Like
Reactions: 1 person
The comments on this blog are cancerous. You can use Visual Studio or Code::Blocks. They're both IDEs and will run the programs you make at the push of a button. Personally, I use Visual Studio because it's what I used last year in class.
 
  • Like
Reactions: 3 people
C
Whatever floats your boat... ¯\_(ツ)_/¯
Since we're sharing what we all use, I use Programmer's Notepad as my choice of IDE (it comes pre-installed with devkitpro), since it's probably the absolute easiest thing to get up and running if you're a lazy coder like me lol. In fact, that said, I never even had to touch anything at all to make it work; just launch it and it instantly does what you expect it all to do.
(and there are also in-built make commands at the push of a button which are super useful)
 
  • Like
Reactions: 1 person
F
I mostly used Notepad++ to do my work.
Now gonna try codeblocks and stuff, see how that works.
 
C
Yeah, I think I will also switch to Code::Blocks after I've finished my current project and I'm not feeling lethargic... cuz the last time I tried to set up and configure everything it was a pain in the ass since it was telling me it couldn't find my MSYS2 path when I already had it all clearly installed lmao
 
  • Like
Reactions: 1 person
It's a pain in the ass on Windows actually despite the fact that it also works. C is just one of those rare things which are easier to handle on Linux. Use some Linux distro like Kali in VirtualBox and it has GCC pre-installed. For writing you should use e.g. CLion because it's pretty good. Enjoy. :)
 
  • Like
Reactions: 2 people
F
Well, I'm currently using Code::Blocks and so far i'm happy with it.
It's easier to debug for me.
( I do some common mistakes but eh )
 
now try to compile this...
#include<windows.h>
#include<stdio.h>
int x=1,y=6,dx=1,dy=-1,maxX=60,maxY=20;
COORD coord={0,0};
void gotoxy(int x, int y){
coord.X = x;
coord.Y = y; // X and Y coordinates
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
int main(){
while(true){
gotoxy(x,y);
printf(" ");
x+=dx;
y+=dy;
if((x==maxX)||(x==0)) dx= -dx;
if((y==maxY)||(y==0)) dy= -dy;
gotoxy(x,y);
printf("%c",32+x+y);
Sleep(50);
}
return 0;
}
It's my small mod of bouncing ball which i remember as example program for c64 basic learning.
 
  • Like
Reactions: 1 person
I'm surprised nobody mentioned the Linux Subsystem for Windows since you're on Windows 10*, it's basically like having Debian or Ubuntu in a command-line that you can use to install gcc and other stuff pretty easily, or so I've heard.

*If you're on LTSB or something you probably won't have access to it though, since iirc it needs the Creator update.
 
  • Like
Reactions: 2 people
F
Yeah Ubuntu terminal is built in.
It's hard to find it though. @daxtsu
 
Correct me if I'm mistaken but from my experience the Linux subsystem still compiles for Linux, which means the binaries it builds aren't Windows compatible anyway. So when you're moving out of CLI dev territory you're still gonna have to get an IDE..or deal with compiling on Windows.
Speaking of which, am I the only one who hates IDEs? I don't want a big bulky editor just to compile. Give me a lighweight and preferably customizable editor like Sublime and I'm good.
 
  • Like
Reactions: 2 people
F
Why would you want to customize it?
 

Blog entry information

Author
Felek666
Views
360
Comments
128
Last update

More entries in Personal Blogs

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: ok not just