Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C Compiler in Vista

  • 16-01-2008 6:10pm
    #1
    Registered Users Posts: 42


    Hello all. I've been looking for a C compiler that can be used in Windows Vista for the past couple of weeks but to no avail. I was wondering if anybody knew of one out there. If it makes a difference, I'm using a laptop so I think it's 32 bit Vista. Not sure if that matters.
    Thanks.


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    gcc surely?


  • Registered Users Posts: 42 cake126


    You'd think so, wouldn't you?!? Tried it but going to their site <http://gcc.gnu.org/&gt; was like going in circles. They don't have an install file, just loads of files, which I downloaded, put my test program in with and tried but I didn't work. Command line just keeps telling me that gcc is isn't a recognized command.


  • Closed Accounts Posts: 1,974 ✭✭✭mick.fr


    Do it from Unix/Linux, that works too. Then install the file on Windows.
    You can compile DLL on Unix for Windows machines.


  • Registered Users Posts: 42 cake126


    I don't have Unix/Linux and it's only for an assignment for college so I don't really see the point in partitioning my drive for the sake of 30% of a mark. Thanks anyway though. Is there a handy Unix kind of simulator that will run on Windows? I know of CygWin but it seems a little tricky.


  • Closed Accounts Posts: 583 ✭✭✭monkey tennis


    You can either install cygwin, which I assume includes gcc, or use the Windows port of gcc with Mingw. Look here for a package that installs these two plus a nice IDE (DevC++) all in one go.

    I seem to remember someone complaining that they still couldn't get gcc/mingw to work on Vista, but have a go and see how you get on - at least you'll get it installed in the first place.
    cake126 wrote: »
    I don't really see the point in partitioning my drive for the sake of 30% of a mark.

    If you want to have a bash (sorry) at linux, you don't need to partition anything - you can use a livedisc (e.g. knoppix).


  • Advertisement
  • Registered Users Posts: 42 cake126


    That did install but it only seems to work for C++ programs where I'm, unfortunately, restricted to the awesome power of C! Is there a C compiler embedded in there that I could map to or anything?


  • Closed Accounts Posts: 583 ✭✭✭monkey tennis


    It works for C, you must have overlooked something.

    (Plus, any standards-compliant C program is also a valid C++ program)


  • Registered Users Posts: 42 cake126


    I don't know why it doesn't compile. I tried and got this:

    Can you see the image?
    The program is missing a { after the main but the compiler just ignores that and says it's all fine and dandy.


  • Closed Accounts Posts: 71 ✭✭Mach


    cake126 wrote: »
    You'd think so, wouldn't you?!? Tried it but going to their site <http://gcc.gnu.org/&gt; was like going in circles. They don't have an install file, just loads of files, which I downloaded, put my test program in with and tried but I didn't work. Command line just keeps telling me that gcc is isn't a recognized command.

    Well there bit more, you need to need set the right path, but did you dowload win file or the linux. BTW you don't need to partion HDD to instll linux either use Live CD or a vitural machine . Also i'm surprised noone mention mingw. itis basicly a port of gcc for windows. Also did you google before ask the question?


  • Registered Users Posts: 42 cake126


    I got MingW and yes I did google it. That's how I came across MingW, GCC and a few more. Thanks for the advice though. I'll give it a glance now.
    I'm just on one of the GCC mirror sites getting the newest version (4.2.1). Has anybody got a clue what I'm supposed to download so as to have a compiler?
    ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.1/


  • Advertisement
  • Closed Accounts Posts: 71 ✭✭Mach


    Also DEVC++ from bloodshed software is pretty good too. Easier to install than gcc


  • Moderators, Technology & Internet Moderators Posts: 11,017 Mod ✭✭✭✭yoyo


    Dev C++ has issiues under vista, I had same issiue, there is a fix on the Dev C++ forums, cant find it now though, it details what must be done to fix it (Involves setting file and folder paremeters iirc)

    Nick


  • Registered Users, Registered Users 2 Posts: 2,593 ✭✭✭Soundman


    Not 100% sure but I believe the Visual Basic 2008 Express Edition has what you are looking for. Downloadable HERE


  • Registered Users Posts: 42 cake126


    There's a C# one and C++ one but is there one that will compile and run simple C programs?


  • Registered Users Posts: 42 cake126


    Hey folks. Just want to say thanks for all your help and advice. MY compiler of choice was DevC++. There were a couple of problems compiling initially but there is a work around on the following site.

    http://opcode0x90.wordpress.com/2007/10/19/dev-c-bugs-under-windows-vista/

    Just in case it's out of date, I'll copy paste it here. Just don't want to take full credit for it.
    Recently I installed Dev-C++ under Windows Vista, but when I try to compile the template DLL, it gives the following error in compile log.

    gcc.exe: installation problem, cannot exec `cc1′: No such file or directory

    In Dev-C++, go to Tools -> Compiler Options -> Directories -> Binaries, add this following directory
    \Dev-Cpp\libexec\gcc\mingw32\3.4.2

    Compile the project again. Okay, now what?

    ld: crt2.o: No such file: No such file or directory
    ld: dllcrt2.o: No such file: No such file or directory
    ld: crtbegin.o: No such file: No such file or directory
    ld: crtend.o: No such file: No such file or directory
    ld: cannot find -lgcc

    (Update: 1 November 2007)
    To workaround this errors, you need to do the following steps:

    1. Copy dllcrt2.o and crt2.o from \Dev-Cpp\lib to \MingW\lib.
    2. Copy crtbegin.o and crtend.o from \Dev-Cpp\lib\gcc\mingw32\3.4.2 (version may vary depending on your mingw version) to \MingW\lib.
    3. In Dev-C++, go to Tools -> Compiler Options -> Directories -> Libraries, add this following directory
    \Dev-Cpp\lib\gcc\mingw32\3.4.2
    (again, version may vary depending on your mingw version)

    Compile your project, it should work now. Now I try to compile the C version, oh no more errors.

    Thanks again to all.


Advertisement