News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Compiling C++ libraries

Started by patryk77, January 19, 2009, 12:18:20 AM

Previous topic - Next topic

patryk77

I am trying to compile the SDL_Config library, but it uses C++ code.

If I use a Static library project, it refuses to compile as it seems to use a C compiler and does not find <map>, <vector>, etc.

How would I set the project to compile with the C++ compiler?

Thanks

Using GCC under Ubuntu 8.04 netbook remix

MortenMacFly

Quote from: patryk77 on January 19, 2009, 12:18:20 AM
How would I set the project to compile with the C++ compiler?
Files with the extension "c" are compiled using GCC (the C compiler). Files with the extension "cpp" (and others like cc) are compiled using the G++ compiler. Rename your files accordingly.
BTW: Searching the forums helps. You'll find more information on that topic in a query ~ 2-3 days before. Please search before asking.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]