program that is like a unix c compiler for windows?

AznMaverick

Platinum Member
Apr 4, 2001
2,776
0
0
i currently have visual c++ 6.0, but the programs on 6.0 and the unix c compiler output slightly different things...is there anyway i can get a c compiler program that acts like a unix compiler?
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: AznMaverick
i currently have visual c++ 6.0, but the programs on 6.0 and the unix c compiler output slightly different things...is there anyway i can get a c compiler program that acts like a unix compiler?

Define what you mean by acts like a Unix compiler.

All a compiler does is to convert source code into object files which are then linked into an executable.

Different compilers and linkers will generate code differently.

Some will be faster in the compilation, others will have tighter faster code.

Unless the end result is incorrect, it should just be a matter of what you feel comfortable using.

 

AznMaverick

Platinum Member
Apr 4, 2001
2,776
0
0
sorry, but this compiler doesn't compile code. for some reason the unix compiler generates different numbers (no i'm not using a random number function), than the c++ compiler in windows. also, i've tried using the above program and it keeps giving me a problem of "unable to run program file". i just copied the code and clicked "compile" and nothing happens, hmm...
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
Are you sure that you are using the right libraries (#include <...>)? IIRC gcc/g++ has different libraries from vc++.. you might wanma check on that.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Provide a link to the code and some of us can check it out against multiple compilers.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
try cygwin (google it)

it's a unix-like environment for windows. comes with compilers and everything.
 

AznMaverick

Platinum Member
Apr 4, 2001
2,776
0
0
thanks guys, the unix server for school came back up, i fixed the program. i downloaded the cygwin program, a quesiton i have is, how do you modify the envoronment and the setup for vim? i tried looking for the .cshrc file just like on unix, but it doesn't seem to be there...
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: AznMaverick
nevermind this is bashrc. how do you modify the colors for vim?

First make sure that you are realy using vim and not something like nvi or elvis. Do a "which vi" to find the binary and do a ls -l of it to see were it's sym-linked to.

I also assuming that your running the command line version and not the gui version (gvim or something like that)

Vim will automaticly change colors according to what it thinks your working on. It has a couple different things it looks for in a file to guess what file type it is. But the easiest is to use a extension of the filename.

Like if your writing a new file, starting vim with something like this:

vi helloworld.c

Will tell vim to setup the colors to match C programming syntax.

Other then that, I don't know. That's about the limit to my knowledge on vim's colors.

The gui version of vim allows more control, I beleive, and there are many extensions built for vim to use that help out programming a lot.

check out here

That's part of a open book teaching how to use vi in general.


And their is also extensive documentation aviable from vim's own website.

From what I've heard before that once people get the enviroment set up to how they like it and get used to it, then they can program much faster in vim then thru a big IDE.