Libraries

Pages: 12
Hey guys I use Bloodshed as my compiler and I've found that it is missing alot of the standard libraries such as sstream.h. I was just curious, where do you guys download these libraries from? Thanks!
sstream.h is not part of the standard library, you're probably thinking of sstream.
Besides, both your IDE and the compiler that comes with it are outdated, so you should switch to Code::Blocks and use the bundled version of MinGW that comes with it.
Oh I didn't know sstream.h was different from sstream. I'm guessing when you have FILE.h, it looks for header files in the libraries folder. Interesting. That does work for me. I removed the .h, and it found the header file.

See I just started desktop programming so this is all very new to me. I was checking out Code::Blocks and it seems very nice. Looks alot better than Bloodshed.

By the way, if I compile with MinGW, would the application (console application) not run on Mac's?
By the way, if I compile with MinGW, would the application (console application) not run on Mac's?

No, it won't. But you can just recompile it on a Mac using its native version of g++.
So I should probably just download the standard version without the MinGW. What happens is that I don't know if my Computer Science teacher will use a Mac or a PC to run programs that I will work on. In school, and her office, both use PC but I think at home she uses a Mac. I don't want it to not compile and adversely affect my grade.

Which one would you recommend? The standard version or the version with MinGW?
Get the package with Mingw and save yourself from head ache. You're the one going to use it anyway, not your teacher ;)
You can't compile anything without a compiler, so it's not like you have a choice.
Dev-C++ also comes bundled with MinGW, just with an old version (which Code::Blocks would use if you don't download the MinGW bundle).

If you don't use any platform-specific code, you can compile your program anywhere, be it on Windows, Mac, Linux or your washing machine.
Ok thank you guys. Appreciate your help.
You could also get g++ to compile on Windows targeting a Macintosh
Bazzy wrote:
You could also get g++ to compile on Windows targeting a Macintosh

How can I do that sir?
What is wrong with using dev-c++ if you update the compiler and debugger and all that?
that it's still an ugly IDE
As far as I know, Dev-C++ doesn't even have code completion.
And that just tempts you to use short and cryptic descriptors and abbreviations.
It kinda does but, well, it sucks.
It (Dev-C++) does kind of suck as an IDE. Saying that, Code::Blocks has started to piss me off more and more since v. 10.05 was released. I like that it has code-completion and like features, but it's pretty annoying when you do this:
1.
1
2
if (expression)
        statement;

-->
1
2
3
if (expression)
        statement;
        function_call(); // Realise I need to add this 

-->
1
2
3
if (expression) { // Add braces
        statement;
        function_call();

-->
1
2
3
4
if (expression) {} // Code::Blocks adds another brace automatically
        statement;
        function_call();
        // FFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUU 

2. printf(Hello, world");
-->
printf("Hello, world"); // Forgot a speech mark
-->
1
2
printf(""Hello, world"); // Code::Blocks adds another " automatically
// FFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUU 

3.
1
2
if ((expression one))
        statement;

-->
1
2
if ((expression one) && (expression two) // Wait, this also depends on "expression two"
        statement;

-->
if ((expression one) && (expression two)

(expression two)

)
Unmatched '('

-->
// FFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUU

You also can't disable the above features AFAIK, so I've gone back to gEdit briefly until they fix Code::Blocks.

I'll make a more exhaustive list of annoying bugs at some point and send it to them so they can fix it.
Last edited on
Been having the "-problem with Netbeans too, but (luckily) it has no {}-completion (does have it for regular, squared and those tagging-braces). But that's cool, since they're used for things that are in a single expression on a single line, normally. () being for normal expressions, [] for array/vector/element-access stuff, <> for includes.
You can turn off the brace completion on C::B, it's on the first page of the editor settings...
Oh, I looked for it but didn't see it. Still, it's useful, it just needs refining really.
Oh, yeah? Well, sometimes I'm writing in Maxima and, say, I want to replace some text with an opening parenthesis. So, I select the text
some text selected text some other text
I hit shift-8, and...
some text (selected text) some other text
Son of a-
I'm sure there are situations where that would be useful, but I would prefer something more in line with regular text editors.
Pages: 12