GingerRobot Posted October 22, 2008 Share Posted October 22, 2008 Edit: That's embarrassing. Meant to post under Misc :s. Can someone move this for me? Ok, so i'm banging my head against the wall here. I'm having real troubles finding a way to compile c programs under windows on a friend's machine. I generally develop in linux but do have Bloodshed Dev-C++ installed in windows should I need it. A friend of mine isn't exactly computer minded, but part of her engineering mathematics course included c programming. She wanted to be able to try some of the programming at home, but whatever I try, i can't get anything to compile. I used the exact same installer for Dev C++ as is on my laptop, but got error messages(first, gcc couldn't find cc1 - whatever that means. After finding an apparent fix for that, it attempted to compile but with a load of errors in stdio.h - go figure) Since, i've tried all sorts of things. Under an academic license we can install Visual Studio for free, so I tried that but it's bloody confusing. I couldn't work out what the hell it was using to compile and it was all a bit over the top. Tried a couple of gcc ports, but to no avail. MinGW (which our department recommends) started to download the installer then fell over - looks like a problem with the sourceforge website. Tried a different one, gcw, which looks decidedly incomplete. So, long story short, any suggestions? Do you guys use anything in particular? Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/ Share on other sites More sharing options...
DarkWater Posted October 22, 2008 Share Posted October 22, 2008 Does Cygwin have gcc? Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672142 Share on other sites More sharing options...
corbin Posted October 22, 2008 Share Posted October 22, 2008 I had that exact problem with Dev-C++ once! Don't remember how I fixed it though x.x. Have you tried installing it somewhere else? Oh, and by the way, when it says no spaces in the file path, it really means it. Doubt that's it, but worth noting. What was wrong with Visual Studio? Over the top??? I would just try entirely uninstalling Dev-C++ and reinstalling. Or, I would try a different version or something. (Hrmmm wow this post didn't help at all.) Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672194 Share on other sites More sharing options...
GingerRobot Posted October 22, 2008 Author Share Posted October 22, 2008 What was wrong with Visual Studio? Over the top??? Yep. Ridiculously confusing. And i couldn't work out what, if any, standard was being used when the program was compiled . I would just try entirely uninstalling Dev-C++ and reinstalling. Or, I would try a different version or something. Tried that. Quite a few times :s Does Cygwin have gcc? Yeah, it looks like it's optional. Is Cygwin easy to use? I've no experience with it at all. Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672231 Share on other sites More sharing options...
DarkWater Posted October 22, 2008 Share Posted October 22, 2008 Cygwin is sort of like a Linux shell emulation, so if you have experience with a *nix-like system, you should be okay. Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672232 Share on other sites More sharing options...
GingerRobot Posted October 22, 2008 Author Share Posted October 22, 2008 As i say, it's not actually for me. Hence the need for it to be simple. Ill take a look tomorrow though, so thanks for the input. On the plus side, i did manage to get this MinGW gcc port thingy working on my machine, so that's something else to look at. Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672234 Share on other sites More sharing options...
DarkWater Posted October 22, 2008 Share Posted October 22, 2008 Opening up Cygwin, and using: cd /path/to/file gcc somefile.c -o somefile Isn't too complicated. Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672241 Share on other sites More sharing options...
.josh Posted October 23, 2008 Share Posted October 23, 2008 I too will vouche for VS being very user un-friendly and non-intuitive. I've used bloodshed a couple times in the past without any problems, so I guess I have nothing to add :/ Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672333 Share on other sites More sharing options...
corbin Posted October 23, 2008 Share Posted October 23, 2008 I use Visual C++ on occasion, and I don't have problems with it being unfriendly.... Although, I have had to get into the shell more than a couple times to get include paths and what not like I want them. By the way, the compiler it uses is cl.exe, no idea if that's ANSI standard or not. (That might actually be the C++ one, don't remember.) Oh, if you compile something under Cygwin, it will be dependent on the Cygwin environment, since it is linked against its libraries. (Cygwin.dll and so on.) Also, if this class is based around Windows, Cygwin would probably cause her more problems than help. Then again, I guess anything built under Cygwin should be Windows compatible too if it doesn't need any Cygwin specific libraries (the linux ones it emulates). Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672471 Share on other sites More sharing options...
GingerRobot Posted October 23, 2008 Author Share Posted October 23, 2008 I managed to get MinGW to work, thank god. Thanks for all the input. Quote Link to comment https://forums.phpfreaks.com/topic/129634-solved-suggestions-for-compiling-ansi-c-under-windows/#findComment-672934 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.