SFML Problem

Pages: 12
Sep 6, 2011 at 9:45am
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 Sep 6, 2011 at 10:46am
Sep 6, 2011 at 9:59am
The best idea would be to download SDL or SFML and stop limiting yourself by sticking to the console.
Last edited on Sep 6, 2011 at 10:00am
Sep 6, 2011 at 10:33am
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 Sep 6, 2011 at 10:34am
Sep 6, 2011 at 10:37am
Try linking to the window module as well.
Sep 6, 2011 at 10:44am
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?
Sep 6, 2011 at 10:46am
You should probably also copy the respective dll files next to your executable or in your system directory.
Last edited on Sep 6, 2011 at 10:47am
Sep 6, 2011 at 10:55am
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
Oct 25, 2011 at 11:42am
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.
Oct 29, 2011 at 7:03am
It happens with every code.
I am downloading SFML 2.0, and will follow the steps in the tutorials you linked
Oct 29, 2011 at 11:29am
Let me know if you have any luck! Are you using an ATI graphics card by any chance?
Oct 29, 2011 at 11:30am
I am using NVIDIA graphics card.
Oct 29, 2011 at 1:32pm
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!
Oct 29, 2011 at 2:45pm
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!
Oct 29, 2011 at 2:47pm
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.
Oct 29, 2011 at 3:09pm
@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.
Oct 30, 2011 at 6:11am
@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 Oct 30, 2011 at 6:12am
Oct 30, 2011 at 8:04am
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...
Oct 30, 2011 at 9:42am
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.
Oct 30, 2011 at 12:11pm
@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.
Oct 30, 2011 at 12:18pm
@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