Code::Blocks Forums

User forums => Help => Topic started by: neo1691 on December 21, 2011, 02:22:59 pm

Title: sstream and similar files not found
Post by: neo1691 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/ (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!

(http://i1133.photobucket.com/albums/m594/neo1691/settings.png)

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

(http://i1133.photobucket.com/albums/m594/neo1691/error.png)

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?
Title: Re: sstream and similar files not found
Post by: oBFusCATed 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.
Title: Re: sstream and similar files not found
Post by: neo1691 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