IDE: Library & Header Confusion

Hello everyone. I'm a BASIC programmer, coming from the VB6 and VB.Net environments. Although I have some familiarity with the C/C++ language, the need for the various libraries and headers have always stumped me. I've tried DevC, Eclipse and CodeBlocks, but invariably face compiler stonewalls due to this, especially when testing code samples from the web.

The BASIC IDEs that I use seem to be more integrated, in that no external or third party libraries are required. Almost any sample code meant for the respective language, be it VB6 or VB.Net, will run unfailingly.

Am I missing something, or are there multiple dialects to C/C++? It seems that code meant for Visual C++ won't work with any of these GCC IDEs. Or would it?

Is there any way to have a fully integrated C/C++ IDE that can run any sample code obtained from the web? My goal is platform independent C/C++ development, and as such Visual C++, which I believe is geared more towards Windows development, may not be suitable.

Also, would such cross-platform coding be viable and efficient, or would the use of cross-platform libraries result in slow and bloated executables?


Sorry for all the questions, but this site has always seemed like the ultimate C/C++ authority to me, and that's why I decided to join and get help.

Thanking you in advance; any help or direction is appreciated.
You missing the compiler, which actually do the compiling. You can use Windows only IDE Visual C++ with GCC compiler, which is crossplatform, or crossplatform Code::Blocks with Microfoft Visual Studio compiler, which is windows only.

are there multiple dialects to C/C++?
You can call C++03 and C++11 that, but your problem probably with different compiler "extensions" which should be avoided like hell (and downright standard violation. Yes Microsoft, it is about you and _tmain()).

Best you cand do it is make sure, that all your code complied to standard. That code should compile on every modern compiler.
Thank you, MiiNiPaa, for your prompt reply.

MiiNiPaa wrote:
You missing the compiler, which actually do the compiling.
Both my installations of Eclipse and CodeBlocks currently make use of the MinGW C++ compiler.

MiiNiPaa wrote:
Best you cand do it is make sure, that all your code complied to standard.
This sounds like what I need. I'm assuming that you mean standard libraries. How do we differentiate standard from non-standard libraries, and would standard functions comprehensively cover all basic coding requirements, like windowing, image handling, drawing, file i/o, printing, etc.?

MiiNiPaa wrote:
That code should compile on every modern compiler.
Do you mean cross-platform? Wouldn't that require special toolkits?

Thanks again.
or are there multiple dialects to C/C++? It seems that code meant for Visual C++ won't work with any of these GCC IDEs. Or would it?


There are multiple implementations: each major software vendor (Microsoft, IBM, Apple, Intel, Sun/Oracle, HP) has its own C++ compiler and a C++ standard library, and there are open source implementations such as GNU, and specialized vendors such as EDG

Since no company or organization owns either language, a group of volunteers constantly works on maintaining the standards, which are documented requirements to a C++ compiler/library. They are regularly updated and revised: C++ had the first one published in 1998, it was updated in 2003 and revised in 2011. C had the first one in 1989, upd 1995 (I think), rev 1999, upd 2001, upd 2004, upd 2007, rev 2011.

Every vendor tries to make their compiler/library fulfill the standard requirements, and at the same time, provides vendor-specific extensions. Useful extensions are submitted to the standard, reviewed/modified to fit the rest of the language, and then then other vendors have to implement them, etc.

My goal is platform independent C/C++ development, and as such Visual C++, which I believe is geared more towards Windows development, may not be suitable.

If you code to the standard specs, the program will compile anywhere (and if such program doesn't compile, file a bug report). Visual C++ is just fine with standard C++ (not C) programs (there are still bugs in their implementation of the 2011 set of requirements, but they are worked on)

would standard functions comprehensively cover all basic coding requirements, like windowing, image handling, drawing, file i/o, printing, etc.?

There's the catch. No windowing, images, or drawing at all. File I/O is included though.
Hello Cubbi, and thanks for your reply.

Cubbi wrote:
Every vendor tries to make their compiler/library fulfill the standard requirements, and at the same time, provides vendor-specific extensions.
So, all compilers must conform to the language standards, but can also have exclusive, non-standard, proprietary extensions. Got it; that's where learning by examples becomes a problem for me. Are API calls part of the standard set?

Cubbi wrote:
There's the catch. No windowing, images, or drawing at all.
Here, I'm assuming that we'd have to depend on those platform-specific extensions, or resort to third-party toolkits, like GTK, Qt, wxWidgets, etc. Does using such toolkits bloat up the final executable?

Thank you.
all compilers must conform to the language standards,

There is no such binding contract, but if they don't, their customers may switch to the ones that do, and they will less likely get new customers (whose existing code expects a standard-conforming implementation).

Are API calls part of the standard set?

Define "API". C and C++ library facilities can be referred to as APIs, other standards, such as POSIX provide APIs, operating systems provide APIs (see WinAPI).

Does using such toolkits bloat up the final executable

I'm not familiar with GUI toolkits, but in general, third-party library either becomes a part of the executable, or a part of the requirements to run the executable.
I'm assuming that you mean standard libraries.

No, I mean C++ standard (http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2012/n3485.pdf) which contains description of language, its keywords, standart libraries and how all of this should work together.
Last edited on
Cubbi wrote:
Define "API".
Got that one; all API functions are externals.

Cubbi wrote:
...in general, third-party library either becomes a part of the executable, or a part of the requirements to run the executable.
As I thought.

Thanks again MiiNiPaa. The link you provided does not work, but I got your point.

Are there any good resources for open-source libraries?
Arr, just remove the parenthesis at the end: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2012/n3485.pdf
Topic archived. No new replies allowed.