SFML Problem

Pages: 12
I have been learning C++ for a while now (Have completed everything present in this site's tutorial in greater detail and am comfortable with using them...).
I was thinking of making a game in the console.
First, the games I have made already:
1) Tic-Tac-Toe (both 2 & 1 Player).
2) Connect 4
3) Black Jack
4) Dungeon Crawl (from the Beginner's Exercises Article in this site)
5) Hangman

Now I have run out of Ideas for a game that can be programmed within the limitations of the console.

I have tried making a program to solve a given Sudoku, which I failed (unable to get a way to solve it apart from Brute-Force) to do.

So I was hoping you could give me some Idea for making a game...


EDIT:
My OP was asking for a console game suggestion.
As per quirkyusername's suggestion, I downloaded sfml.
Have changed the Topic to a more relvant one
Last edited on
The best idea would be to download SDL or SFML and stop limiting yourself by sticking to the console.
Last edited on
Downloaded SFML, and tried out a simple program given in a Tuitorial:
These are the errors I am getting...

1
2
3
4
5
SFML.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main
1>SFML.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Close(void)" (?Close@Window@sf@@QAEXXZ) referenced in function _main
1>SFML.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>SFML.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ) referenced in function _main
1>SFML.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main


EDIT:
I have linked sfml-graphics-d.lib library as well....
Last edited on
Try linking to the window module as well.
Thanks. That removed those errors.

Now When I run it (in Debugging mode) I get a dialogue box saying:
The application was unable to start correctly (0xc0150002). Clock OK to close the application.


Now what?
You should probably also copy the respective dll files next to your executable or in your system directory.
Last edited on
I had copied the dll files already. The error came after I copied it.
Does the error have something to do with VS?
I am using Visual Studio Professional 2010 & SFML 1.6
I used to have problems like that with SFML. Firstly, does it only happen with certain code, or even with a "minimal" SFML application (e.g. just creating a render window and message loop)?

I suggest you move to SFML 2.0. You'll have to build it yourself, but that's not as hard as it might seem and it's certainly a good learning experience. Here are my tutorials on the subject:
text - http://sfmlcoder.wordpress.com/2011/06/15/building-sfml-2-nmake/
video - http://www.youtube.com/watch?v=PtSDrLpV74M

Do that then try again with those binaries etc. I also have tutorials on how to make a first SFML project, but the video is out of date so I shan't link to them.
It happens with every code.
I am downloading SFML 2.0, and will follow the steps in the tutorials you linked
Let me know if you have any luck! Are you using an ATI graphics card by any chance?
I am using NVIDIA graphics card.
Huh, because I know there was a problem with ATI cards. Anyway, whatever it is, upgrade to SFML 2.0 and then let me know if you still get the problem!
http://www.sfml-dev.org/forum/viewtopic.php?t=6039&highlight=

I had the same problems about 2 weeks ago when I started SFML. The administrator (and SFML designer there), Laurent, is really good. The way I solved these problems was to rebuild SFML 1.6 using VS2010. To this:
1. download the source code for VS2008
2. Open the *.sln file
3. Go through the conversion wizard for VS2010.
4. Build.

Tada!
Oh and don't forget to use the debug ("-d" suffix on the dlls) DLLs in debug mode and the release (no suffix) DLLs in release mode.
@Stewbond Yes, it is important to make sure you use the debugging binaries for debug builds. However, if you are going to the effort of building SFML 1.6 you might as well - at least IMO - build SFML 2.0 instead. It's reasonably bug free - possibly more so than 1.6 - and it makes more sense to learn the new public interface than the old one.
@Xander314;
I have a problem with doing this:
I open the command prompt from VC++ Express.
And type cd c:/sfml/sfml2 which is the name of the location I put it in (same as suggested in video to minimize confusion...), but the command prompt keeps on showing the path:
e:\program files\microsoft visual c++\bin>
I tried it in the windows command prompt (from run), and it works there, but I guess, there are some other functions in VS command prompt, which are needed?
Last edited on
Hmmm. So does it say "no such directory"? Does it even switch to c:/sfml/sfml2/ for a second? For a start, you should check the folder is actually c:/sfml/sfml2/ (no typos or whatever).

Also, maybe try
cd c:\sfml\sfml2
(i.e. with the Windows style backslash '\' rather than the Unix(?) '/'). This really shouldn't make a difference, but I don't know...
So does it say "no such directory"?

No it doesn't.
Does it even switch to c:/sfml/sfml2/ for a second?

Again, no :(
For a start, you should check the folder is actually c:/sfml/sfml2/ (no typos or whatever).

Checked, and it is correct. BTW, if I enter the command (
cd c:/sfml/sfml2
) in the command prompt opened by using run, it does switch the directories!!

The backslash didn't work either...

Though I did try doing so in the windows command prompt (the one that is run by using the cmd in run). After using the cmake command, the output was a load of errors.
@Xander314:
I didn't have problems building SFML 2.0, however I did have a tough time using it. The tutorials on the sfml-dev.org are great for SFML 1.6 but aren't completely compatible with SFML 2.0. So if you are trying to learn the library, stick with SFML 1.6 for now. When the official SFML 2.0 with documentation is released, that is when you'll want to make the switch.
@Nisheeth:

There is a trick to using the cd command. If you want to specify a directory on another drive, you need to first switch drives. Thus it becomes 2 steps:

1
2
e:\program files\microsoft visual c++\bin> c:
c:\> cd c:\sfml\sfml2


It's a windows thing.
Pages: 12