[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 32 KB, 407x600, 1314673297449.jpg [View same] [iqdb] [saucenao] [google]
[ERROR] No.3659963 [Reply] [Original]

Yo /sci/

What's the best C++ compiler for Windows? I heard mention of one earlier but I don't remember the name... Geary, Gnery, something like that. My professor says to use Dev IDE but it causes lots of problems for me that it doesn't cause for other students... refusing to compile if I don't double-space my lines, for example. Stupid shit.

>> No.3659977

GEANY

Also use Linux faggot.

>> No.3659989

Visual C++

>> No.3659995

gcc

Learn to cygwin.

>> No.3660006

>>3659977
geany... thank you!
linux... i've thought about doing that when i get a desktop, i exclusively use a laptop and due to hardware issues, i can't do everything i want. i have also never used linux, so i would have to use someone else's before i make the switch.

>> No.3660017

>>3659995
cygwin sounds interesting! i need a practice form of linux before i switch.

>> No.3660035

on geany, why are the compile and execute buttons up top greyed out?

>> No.3660039

Honestly, if you ever intend to write code for a platform that's not windows, go with Code::Blocks + the mingw g++ backend (which I think is included?).

If you're only ever writing for windows, VC++.

>> No.3660040

>>3660035
try saving first

>> No.3660045

The best C++ compiler for windows is Microsoft's compiler. Windows irritates the shit out of me, and I fucking hate C++, shittiest language ever, but it's a damn good development environment. Haters gonna hate.

Anyway, yeah, if you want to program, use linux. And vim or emacs. What you use at work is irrelevant if you can whip out vim+make.

>> No.3660073

>>3660040
turned out that geany doesn't save it as a .cpp extension automatically, which i fixed. the compiler lights up but doesn't do shit. i then execute and it says "assignment" isn't recognized as a command blah blah blah

>> No.3660345

microsoft visual c is shit. absolute shit.

>> No.3660365
File: 34 KB, 358x338, 1313189143089.png [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3659963
>compiler
>Windows
>mfw

lrn2linux, srsly do it...

>> No.3660415

Linux is the way to go for programming in C.

New document -> save as .c -> reopen -> fuck yeah C ready.

CodeBlocks for windows btw.

>> No.3660441

>>3660073
Extensions don't mean anything.

>> No.3660485

Geany isn't a compiler, it's a text editor that can function as an IDE if you've already got a compiler installed.

Feel free to also try Visual Studio Express, it's free and might be to your liking (despite what lots of people say on the internet, most IDEs aren't "complete shit", and different features appeal to different people).

>> No.3660481

>>3660365
i know, i know. but learning how to change an OS, run a new OS that i've never used before, all while staying current on my classes (online student) is a bit much.

>> No.3660488

Also, C++ on Linux isn't any easier/better than on Windows, wtf

>> No.3660495

>>3660481

Download Ubuntu.

Burn it to Disc.

Put disk in computer and restart.

Ubuntu installation should come up.

The rest is cake. Read everything, there isn't much to read so its not complicated at all.

>> No.3660504

>>3660485
IDEs are complete shit. They're an abstraction inversion of the worst kind, reimplementing make on top of itself through dialog boxes.

>> No.3660515

>>3660504
butthurt terminal fag detected

gb21999

>> No.3660522

Install gentoo

>> No.3660534

>>3660504
*sigh*

ok, enjoy your terminal. if you enjoy spending time configuring your .vimrc/.emacs to convert vim/emacs into a useful development environment and writing your own makefiles, then go for it. believe it or not, there exist people who enjoy using intuitive GUIs and can manage their projects better/get the job done faster that way. suggesting that one way is objectively superior to the other is silly.

>> No.3660539

>>3660495
Why would OP need to install Ubuntu just to program in C++ for fuck's sake

>> No.3660544
File: 40 KB, 560x432, 1240539866791.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>2011
>Not programming in java

>> No.3660547

>>3660539

He doesn't, He just said that it was hard and I wanted to show him that it wasn't.

>> No.3660555

>>3660544

trollface.jpg

>> No.3660567

>>3660534
Actually, when I want to accomplish something I use a decent language. Only after algorithm analysis and basic optimizations fail to satisfy in that language do I step down into C to make a library.

> have 8 gigs of ram
> manually manage memory
I seriously fucking hope you guys don't do this.

>> No.3660591
File: 36 KB, 366x334, 226.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

mfw
Implucations that Ubuntu is top Linux tier.
Ignoring the simple facts that Ubuntu is shit tier, go get Eclipse IDE. It can do C++ and through simple plugins, has the ability to recognize and compile other languages

>> No.3660631
File: 83 KB, 498x363, wtf spongebob.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>compiling C++ on windows
>not codeblocks
>not visual studio
>my face
Eclipse and netbeans are okay, but they need you to set up retarded open sores compilers separately, which entails stupid shit like installing a whole crippled lunix into your windows, fucking around with windows environment variables, and batshit rules such as "your installation path can't contain spaces".

>> No.3660630

>>3660544
This.
Procedure oriented programming is shit tier for almost all applications.

>> No.3660638

>>3660630
> thinks java encourages a significantly different programming style than C++

>> No.3660654
File: 46 KB, 446x388, 1298686696728.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3660567
>he doesn't care about efficiency
I seriously hope you guys don't do this.

>> No.3660674

>>3660654
Agreed.

>> No.3660677

>>3660654
> a+b+c
> endless temporaries ensue
> efficiency
I lol'd, good one bjarne

>> No.3660841
File: 50 KB, 600x467, 1229985508028.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3660654
>>3660674
>claims he cares about "efficiency"
>JVM's JIT compiler and and C# already optimize even most "poorly written" code far better than he could ever do manually, in literally a billionth of the time
I bet you "optimize" your code without a profiler, too. Fucking luddite neckbeards, gb2assembly.

>> No.3660874

>>3660567
let_me_laugh_even_harder.bmp

For as long as there have been hard drives, RAM, and CPUs, there's always been a complete idiot saying "We have more than we'll ever need!"

It's rumored that Bill Gates once said "640KB ought to be enough for anybody." He has since denied saying it, because he realized what an ignorant thing that would be to say... Just like what you just said.

>> No.3660885

>>3660874
> I knocked down a strawman hard
That's super.

>> No.3660897

>>3660841
First of all, what makes you think us "luddites" aren't using assembly all the time? I am. And not just because I want to seem cool to handicapped programmers like you who have to cross their fingers and hope their interpreted toy language doesn't completely choke on something simple.

Second, the optimizations that a compiler can perform are usually about two to three orders of magnitude smaller (in terms of speed increase) than the optimizations performed by the programmer. There's a place for toy languages and there's a place for real languages. If you're fine with only being able to handle one of the two, then keep on truckin'.

>> No.3660902

>>3660885
I love how "strawman" is the new "u mad" of /sci/. I guess it kind of works.

>> No.3660911

>>3660897
>not just because I want to seem cool
Oh, I know your other reason: Because you write code for ICs with like, 2 KB memory, right? Faggot.

>compiler optimization is 300 times smaller
I'm gonna ask for sources on that, because from the research I did, it seems Java performs about the same or better than C.

>> No.3660945

>>3660911
Look at you. Juuuuuuuust look at you. Are you getting your feelings hurt because all you know is some garbage-collected, interpreted, high-level abstraction, and you've been telling yourself all along that that's all you'd ever need to know? And now someone comes along who actually has some experience and shatters the little world you've built for yourself? Sowwy, kiddie.

>> No.3661009

>>3660911
> Because you write code for ICs with like, 2 KB memory, right? Faggot.
LOL like they'd use C++. BTW I do (not the guy you're responding to, but the other sepples-hater) and I use C. Assembly is premature optimization with 2KB of ram.
>>3660945
Oh wow, really? You think performing the job computers were meant to do (boring, repetitive tasks like typing endless syntax and the forced allocation of memory) makes you badass? The time you spent learning RAII and other awesome initialisms just to get hired, the rest of us spent learning how to program well.

For every weird corner case where you learned how C++ was fucking you and what to do about it, someone else learned how to make a program solve a novel problem for a customer.

>> No.3661028

>>3660897
unless you are coding for an extremely slow platform or you are doing very low level stuff why would you use assembly? but then again, your experience with programming is probably a couple of classes at uni. walk into any office where they actually produce shippable code and talk like that and people will start laughing at you. just a heads up, champ.

>> No.3661041

Now you're making the same mistake that Java-kiddy, above, was making. You assume that you *either* learn some low-level stuff like asm or C, *or* you learn interpreted stuff like Java or C#. Personally, I use all of them. I use the low-level stuff when performance really is the heart of the matter. I use the high-level stuff when I need to quickly get an algorithm together. If necessary, I come back and rewrite in C to squeeze out performance.

The real problem with ONLY knowing the high-level stuff is that you just don't have that option -- if your code turns out slow because there's some weird interaction between multi-threading, garbage collection, the interpreter, the operating system, and whatever else, then you're just fucked. If you can write code down to the level of the hardware, then you're not.

>> No.3661047

>>3661028
That's because your "office" writes mobile phone apps. My "office" writes performance-critical software that is very expensive. I ain't hatin' on you, though. I have an Android phone. I enjoy playing Reversi on it from time to time, so I appreciate what your fancy "office" does.

>> No.3661061

>>3661047
> performance critical
> C++
I hope everyone in your office has read and understood about undefined behavior problems. But probably you've just substituted managed, safe environments with design patterns and coding practices.

http://blog.regehr.org/archives/213

>> No.3661071

>>3661061
I don't think I've said "C++" once in this thread, since you enjoy attacking it so much. I did say "C" a couple of times, but you probably don't know the difference. I also mentioned assembly. I also mentioned that I use your high-level languages from time to time, but enjoy not being restricted to only using them.

>> No.3661084

>>3661071
Hard to keep track of who is who sometimes.

>> No.3661086

>>3661041
If "the Java kiddy" is the one asking for sources on C being faster than Java, which are still absent, that was me. I *do* know C, C++ and some assembly. When I was working with electronics, we'd write the IC code in C, compile into assembly, go over the assembly again and push that into the IC.

Right now I only program as a hobby, and C# gets a lot more done for the same effort than C or C++ (granted with the latter, it's mostly that the libraries I need are dildos). Low level programming is for embedded systems, and extremely computationally intensive real time applications. You'd have to be making cruise missiles, writing compilers, patching the linux kernel, or write drivers for using C or assembly to make sense. That OP, or people discussing general merits of programming languages, would be interested primarily in these, as opposed to quickly making bug-free, useful programs with the least effort, is a ridiculous thing to assume.

>> No.3661099

>>3661086
> writing compilers
Here's a cool intro to compiler construction using scheme (PDF)
http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf

>> No.3661107

>>3661086
> You'd have to be making cruise missiles, writing compilers, patching the linux kernel, or write drivers for using C or assembly to make sense
This is ALMOST the truth. You could also be writing FPS games, for example. But really, the reason it's so nice to be fluent in C and assembly is that you gain a better understanding of everything else. At the end of the day, that interpreter for whatever high-level language you enjoy using is probably written in C. And even if it isn't, it's compiled down to assembly. You can usually get by without looking under the hood, but I just don't see why someone interested in programming would want to "get by" without knowing what's really going on. I can't complain, though, because it's such a growing trend among college graduates these days that it has made my skills extremely valuable. Call it bragging, whatever, but there is a shitload of money to be made if you can write low-level code, and it does NOT have to be in the embedded field, or drivers, etc.

>> No.3661116
File: 940 KB, 910x906, 1314751963786.png [View same] [iqdb] [saucenao] [google]
[ERROR]

In one picture

>> No.3661274

>>3661107
Yes true about games FPS. Forgot that one, although it only applies to large teams writing their own engines, I think.

And I agree about knowing C being helpful for understanding CS in general, and CS or CompEng freshmen should certainly be taught C, and probably assembly too, with the options to specialize in them later. But to a hobbyist, I definitely wouldn't recommend it unless he wanted to know about the guts of his OS/CPU.

As for your pay claim, from what I hear, there's far more jobs for high level languages, although maybe the few low level jobs pay better, I dunno.

The point is, after much dicking around with C, when I first discovered Java, I was in heaven with the level of abstraction and automation that I always dreamed of. Yet every time I mention Java, or even C#, people start to chortle and snort but then I question them, and it turns out they have no argument except "low level is more hardcore". I have nothing against you low level fags, or the terminal fags, or the vi/emacs fags (not that I'd ever do what you do) but it's very irritating when some of you get high and mighty about it.

>> No.3661368

>>3661274
C is not useful for understanding what the hardware is doing. This has been a myth for a long time. Modern processors are fucking crazy complicated. Even microcontrollers are starting to get into branch prediction shit and reasoning about performance from source is getting to be impossible. And this is just for C, which is a damn simple language.

This is, of course, a good thing, because programmers should have better things to do than worry whether to use prefix or postfix increment, but I still expect many years of C++ faggotry. I hope multicore environments end up trashing that, paving the way for typed languages that manage to actually guarantee things, but it's hard to see where this is all going to go.