News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

sstream and similar files not found

Started by neo1691, December 21, 2011, 02:22:59 PM

Previous topic - Next topic

neo1691

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
#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?

oBFusCATed

(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!]

neo1691

#2
Quote from: 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.

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