Author Topic: sstream and similar files not found  (Read 38976 times)

Offline neo1691

  • Multiple posting newcomer
  • *
  • Posts: 68
sstream and similar files not found
« on: December 21, 2011, 02:22:59 pm »
Hey folks!!
I enjoyed compiling in code::blocks compiler!!
I am using the latest nightly version with MingW stable compiler!

In my coming semester i will have to work with the native old graphics.h header file, which unfortunately is not available in gcc.
So i added the header file in the include folder from here.
http://codecutter.org/tools/winbgim/
The downloaded file contained the following.
1)graphics.h
2)winbgim.h
3)libbgi.a

I placed the .h files in c/MingGW32/include folder and the .a file in c:/MinGW32/lib folder.

Then in code::blocks comipler and debugger settings i added the .a file as follows!



then i tried to compile this simple code
Code
#include<graphics.h>
#include<conio.h>

void main()
{
    int gd=DETECT, gm;

    initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
    circle(200,100,150);

    getch();
    closegraph();
}

And it gave this error



Then i went hunting for the sstream file, and it was there in this directory
C:\MinGW32\lib\gcc\mingw32\4.6.1\include\c++

So i made a little changes in the graphics.h header file itself. Instead of #include<sstream> i changed it to #include"C:\MinGW32\lib\gcc\mingw32\4.6.1\include\c++\sstream"

So that worked but then the error was in sstream file. ;D It said that #include<istream> is not found. And then the error was reccuring somehow in all files even after the above modification.

So folks how to get rid of this minor problem i am facing?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: sstream and similar files not found
« Reply #1 on: December 21, 2011, 02:44:36 pm »
Read the FAQ here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29

But I guess your compiler installation is broken.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline neo1691

  • Multiple posting newcomer
  • *
  • Posts: 68
Re: sstream and similar files not found
« Reply #2 on: December 21, 2011, 02:49:25 pm »
Read the FAQ here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29

But I guess your compiler installation is broken.

Well I used the TDM GCC setup to get mingw!!
What should i do then?

Reinstall gcc?? and then reset C::B?

EDIT:: It was a stupid error.
I saved it as .c instead of .cpp
« Last Edit: December 21, 2011, 02:51:45 pm by neo1691 »