You need to work on following directions.
From git project https://github.com/stahta01/windows-games (https://github.com/stahta01/windows-games)
Edit: I just redid that git repo; to more closely match the one I forked it from.
The code that is testing the Library; I suggest you delete the library you installed on your PC;
Note: You might need to deleted Code::Blocks and the Compiler and start over if you have no idea on what to delete.
#include <graphics.h>
#include <iostream>
using namespace std;
int main( )
{
fillsettingstype f;
initwindow(300,300);
getfillsettings(&f);
cout << f.pattern << endl;
cout << f.color << endl;
bgiout << "What's up?" << endl;
bgiout << "Hello " << 42000;
outstreamxy(30, 30);
bgiout << "Bye." << endl;
outstreamxy(150, 150);
while (!kbhit())
delay(1000);
return 0;
}
Please read and follow the FAQs I post in the future or I will just ignore you!
Tim S.
An example of a full build log.
-------------- Clean: test-simple Debug in testbgi (compiler: GNU GCC Compiler)---------------
Cleaned "testbgi - test-simple Debug"
-------------- Build: test-simple Debug in testbgi (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -fexceptions -g -I..\include -c C:\Users\stahta01\devel\open_source_code\version_control\windows-games-git\WinBGIm\all-tests\test-simple.cxx -o ..\.objs\Debug\all-tests\test-simple.o
mingw32-g++.exe -L..\lib -o ..\bin\Debug\test-simple.exe ..\.objs\Debug\all-tests\test-simple.o -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 -mwindows
Output file is ..\bin\Debug\test-simple.exe with size 1.15 MB
Process terminated with status 0 (0 minute(s), 5 second(s))
0 error(s), 0 warning(s) (0 minute(s), 5 second(s))
Tim S.
mingw32-g++.exe -o bin\Debug\Example.exe obj\Debug\main.o -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 "C:\Program Files\CodeBlocks\MinGW\lib\libbgi.a"
You should be linking to only one bgi library!!
I would try removing "C:\Program Files\CodeBlocks\MinGW\lib\libbgi.a".
Note: This is NOT likely the cause of your problem; but, might be hiding the real cause.
Tim S.