Author Topic: Composite project using opengl and iostream  (Read 5656 times)

Offline mysteriousmonkey29

  • Single posting newcomer
  • *
  • Posts: 3
Composite project using opengl and iostream
« on: December 24, 2011, 06:31:40 pm »
I am trying to complete this openGL video tutorial series with code blocks as my IDE and GNU GCC as my compiler:
http://www.videotutorialsrock.com/

Unfortunately, each example program includes iostream as well as openGL and GLUT libararies.  When i try to compile the first program, code blocks claims that it cannot find iostream, and does not recognize the "using namespace std" line.  I have tried manually linking the iostream library, but it does not solve the problem.

Is there any way to create a composite project on code blocks, like in this case a console application/openGL project?  I have already tried shift clicking in the type of project menu (to try to select two types of projects at once), but it apparently isn't that simple, if it is even possible at all.  Any ideas on how to solve this problem, or how to create composite projects?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7786
    • My Best Post
Re: Composite project using opengl and iostream
« Reply #1 on: December 24, 2011, 08:38:37 pm »
Read the FAQs
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Quote
Remember the file extension matters: *.c is compiled as C file, *.cpp is compiled as C++ file.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline mysteriousmonkey29

  • Single posting newcomer
  • *
  • Posts: 3
Re: Composite project using opengl and iostream
« Reply #2 on: December 25, 2011, 08:48:09 am »
thanks a bunch!  that worked, although it appears the default setting for an opengl project is a .c file :(.  fortunately, although it does take a long time, i just created a console application and manually linked all the libraries, which does work