Author Topic: Compiling C++ libraries  (Read 3000 times)

patryk77

  • Guest
Compiling C++ libraries
« on: January 19, 2009, 12:18:20 am »
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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Compiling C++ libraries
« Reply #1 on: January 19, 2009, 06:57:11 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ