Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yoni0505

Pages: [1]
1
General / SFML source and Visual Studio 2013
« on: September 30, 2013, 02:24:30 pm »
Today I tried to compile SFML for Visual Studio 2013 Express RC.
Using CMake-GUI, I configured to make static libs (BUILD_SHARED_LIBS unchecked), and some of the projects failed to load.

The problem was that some of the .vcxproj files had unnecessary &quot";" next to some of the quotes inside tags.
So to fix it you simply have to remove all the &quot";" from these files.

I'm unfamiliar with the cmake stuff, so is it a bug with CMake-GUI, Visual Studio 2013, or the implementation of SFML's cmake?

Oh and if anyone is interested, here's the VS 2013 RC build I compiled:
http://www.mediafire.com/?49879nw207yv0ac

2
General / Tutorial - Window - Opening a window - doesn't work
« on: September 10, 2011, 12:31:46 pm »
Thank you Serapth, your solution is working.  :)

3
General / Tutorial - Window - Opening a window - doesn't work
« on: August 27, 2011, 05:49:30 am »
Quote from: "OniLink10"
Add SFML_STATIC to your defines.

I tried add "SFML_STATIC" to my defines (preprocessor definitions) but I still get the same errors.

I also notice that all the errors related to the sfml-window-s.lib

4
General / Tutorial - Window - Opening a window - doesn't work
« on: August 26, 2011, 09:28:35 pm »
It works fine when I use DLLs, but when I try to statically link the libs it give me errors.

Using SFML 1.6 and VC++ 2010 (with recompiled files):

I open empty win32 project.
use the code from the tutorial example.
change from "debug" to "release".
link:
sfml-system-s.lib
sfml-window-s.lib
sfml-main.lib

and I get these errors:

Code: [Select]
1>------ Build started: Project: SFML - Opening a window, Configuration: Release Win32 ------
1>  main.cpp
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>sfml-window-s.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>sfml-window-s.lib(WindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>sfml-window-s.lib(VideoModeSupport.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z)
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z)
1>c:\users\home-2\documents\visual studio 2010\Projects\SFML - Opening a window\Release\SFML - Opening a window.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


*the first SFML program example at the "SFML and Visual Studio" tutorial works for me.

I used to use SFML before and it used to work. What do I do wrong?

5
Window / KeyPressed won't repeat
« on: December 26, 2010, 05:42:04 pm »
Quote from: "Laurent"
Backspace is a valid unicode character, so it gets added to your string if you don't filter it out. So I guess that's what happened, and you always ended up adding/deleting the backspace char.

This is heavy man... (  :lol: )

I checked if "Enter" (Return(?)) is also unicode char, I found a list on wikipedia and found "Carriage return", is it like the key.code.return?

if so I can use else if for the Text event  :)

EDIT:
Thank you guys, problem fixed.

6
Window / KeyPressed won't repeat
« on: December 26, 2010, 07:09:40 am »
Quote from: "panithadrum"
Maybe this should be:
Code: [Select]
Field->str.substr(0, Field->str.length() - 2);
?

Let's get first that function working well!

Ok, it's working, but on the first delete after each time new char was entered, as I said, it would delete the first two chars.
How do I fix the first delete? There must be a reason for this, and if we can find it we would be able to find reasonable solution.

EDIT:
Could it be a null character problem?
When I add sf::Text::Unicode to the string, does it include null character in the end of the string?
And does the null character counted by the str.length() ?
Perhaps this is the source of the problem?
Is there a way to make sure the string is NULL terminated?

7
Window / KeyPressed won't repeat
« on: December 25, 2010, 10:06:13 pm »
Quote from: "panithadrum"
Why dont you test it further? I think that most of the people should debug deeper and smarter for a time before posting a question..

Check if other keys are repeating, for example. Check if you function is called as it should, etc.

Of course I tested it and debugged it as best as I could, googled for answer but didn't find any.
I can't find a reason why this thing happening, after all it works after I enter a new char to the string.

I wouldn't ask in the forums unless I reach a dead end cause it will probably will be much faster to debug then waiting for an answer that may never come.

EDIT:
I found out that the size of the string won't decrease when I delete(?) the last char.
I guess it means that it always will delete the last char in the string that will be null after it was deleted once..?

EDIT:
if I delete 2chars, at the first time it will once delete 2 chars, then it will delete 1 char.

8
Window / KeyPressed won't repeat
« on: December 25, 2010, 09:32:42 pm »
I'm making a text input field and I want to delete the last char in a string when the user press BACKSPACE.

For some reason it isn't working right:
When I press BACKSPACE it will only delete one char then it will not delete anything untill I enter a new char to the string.

Im using this function to delete the last char:

Code: [Select]
void CheckKeyPressed(CField* Field, sf::Event::KeyEvent* Key)
{
if(Key->Code == sf::Key::Back)
{
Field->str = Field->str.substr(0, Field->str.length() - 1);
}
}


I know that the EnableKeyRepeat is true by default.

Why it doesn't work right?  :?

9
General / SFML 1.6 files for Microsoft Visual C++ 2010
« on: December 19, 2010, 07:46:58 pm »
I thought someone might find it useful if I'll upload a build of SFML 1.6 for VC 2010 so you won't have to go through the trouble of converting the source files and building them.

Though I believe if someone will find this post it will be too late  :lol:
If someone gets in trouble or just want a faster way then converting and building the source file, or perhaps downloading and installing VC 2008, then someone may find this useful.

Anyway, here's a download link:
http://www.mediafire.com/?07c9qpx53d6f5az

What you will find is a .ZIP file with a folder inside called "vc2010" and contain 2 folders - "include" and "lib", nice and neat.  :wink:

Pages: [1]
anything