#include <iostream>
#include<graphics.h>
#include<string>
using namespace std;
int main()
{
int gdriver = DETECT, gmode;
initgraph (&gdriver, &gmode,""); // initialize graphics mode
cout << "Hello world!" << endl;
return 0;
}
-------------- Build: Debug in ata6 (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -g -fexceptions -g -Wall -g -c E:\C++\ata6\main.cpp -o obj\Debug\main.o
E:\C++\ata6\main.cpp: In function 'int main()':
E:\C++\ata6\main.cpp:14:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
mingw32-g++.exe -o bin\Debug\ata6.exe obj\Debug\main.o -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 -lbgi -lbgi
Output file is bin\Debug\ata6.exe with size 1.03 MB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 1 warning(s) (0 minute(s), 1 second(s))
[debug]Command-line: E:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args E:/C++/ata6/bin/Debug/ata6.exe
[debug]Working dir : E:\C++\ata6
Starting debugger: E:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args E:/C++/ata6/bin/Debug/ata6.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from E:\C++\ata6\bin\Debug\ata6.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.5
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source E:\Program Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory E:/C++/ata6/
[debug]Source directories searched: E:/C++/ata6;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: E:\C++\ata6\bin\Debug\ata6.exe
Child process PID: 3092
[debug][New Thread 3092.0xf24]
[debug]Program received signal SIGSEGV, Segmentation fault.
[debug]0x0045549f in std::string::assign(char const*, unsigned int) ()
[debug]>>>>>>cb_gdb:
Program received signal SIGSEGV, Segmentation fault.
In std::string::assign(char const*, unsigned int) () ()
[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0 0x0045549f in std::string::assign(char const*, unsigned int) ()
[debug]#1 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
[debug]Program received signal SIGSEGV, Segmentation fault.
[debug]0x0045549f in std::string::assign(char const*, unsigned int) ()
[debug]>>>>>>cb_gdb:
Program received signal SIGSEGV, Segmentation fault.
In std::string::assign(char const*, unsigned int) () ()
[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0 0x0045549f in std::string::assign(char const*, unsigned int) ()
[debug]#1 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
[debug][Inferior 1 (process 3092) exited with code 030000000005]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 3092) exited with code 030000000005]
[debug]> quit
Debugger finished with status 0
I use code blocks 13.12 under XP but I don't have to connection with any games (see your links)
#include <iostream>
#include<graphics.h>
#include<string>
There are no spaces between 'include's in the 2nd and 3rd lines below.Code#include <iostream>
#include<graphics.h>
#include<string>
I am guessing he has a bad library but, the person seems to NOT understand the question about the library version and source.
Or Compiler version and source.
Tim S.
I believe that I have uploaded a good Static Lib
Tim S.