1
SFML projects / Re: Fisynthesis - Crafting, Fishing Game
« on: June 06, 2015, 09:18:39 am »
Seems fun, is there a windows version?
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.
sfml-main-d.lib
and changedYou should look at your project settings (if you are using an IDE).Trying to find the setting in VS2013
That's because the event is generated when the key is pressed, and every few milliseconds (depending on the configuration of your operating system). They do not occur in all frames. You should use a bool to maintain the state of the key.Alright thank you. One more question, I forgot...How do you remove the console in the back of the window?
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Text.hpp>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Window/Event.hpp>
int main()
{
sf::RenderWindow win(sf::VideoMode(500, 500), "Refresher", sf::Style::Default);
sf::Text wb;
sf::Font font;
font.loadFromFile("C:\\Windows\\Fonts\\Arial.ttf");
win.setVerticalSyncEnabled(true);
wb.setColor(sf::Color::Blue);
wb.setString("Welcome Back to SFML!");
wb.setCharacterSize(20);
wb.setStyle(sf::Text::Bold);
wb.setFont(font);
wb.setOrigin(wb.getLocalBounds().width / 2.0f, wb.getLocalBounds().height / 2.0f);
wb.setPosition(win.getSize().x / 2.0f, win.getSize().y / 2.0f);
while (win.isOpen())
{
sf::Event e;
win.clear();
while (win.pollEvent(e))
{
switch (e.type)
{
case sf::Event::Closed:
{
win.close();
}break;
case sf::Event::KeyPressed:
{
switch (e.key.code)
{
case sf::Keyboard::BackSpace:
{
win.draw(wb);
}break;
}
}break;
}
}
win.display();
}
return 0;
}
If you had spend just 2min or maybe even just 1min searching the forum, you'd have come across this link.I stumbled upon that already but didn't quite know what to do. I just figured it out though, thanks you helped.
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___glewBlendEquation
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___glewActiveTextureARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewActiveTextureARB
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___glewClientActiveTextureARB
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___glewBlendEquationSeparateEXT
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___glewBlendFuncSeparateEXT
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_multitexture
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_EXT_blend_equation_separate
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_EXT_blend_func_separate
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewAttachObjectARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewCompileShaderARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewCreateProgramObjectARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewCreateShaderObjectARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewDeleteObjectARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewGetHandleARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewGetInfoLogARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewGetObjectParameterivARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewGetUniformLocationARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewLinkProgramARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewShaderSourceARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUniform1fARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUniform1iARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUniform2fARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUniform3fARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUniform4fARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUniformMatrix4fvARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___glewUseProgramObjectARB
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_fragment_shader
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_shader_objects
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_shading_language_100
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_vertex_shader
1>sfml-graphics-s-d.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_texture_non_power_of_two
1>sfml-graphics-s-d.lib(GLExtensions.cpp.obj) : error LNK2019: unresolved external symbol _glewInit referenced in function "void __cdecl sf::priv::ensureExtensionsInit(void)" (?ensureExtensionsInit@priv@sf@@YAXXZ)
1>sfml-graphics-s-d.lib(GLExtensions.cpp.obj) : error LNK2019: unresolved external symbol _glewGetErrorString referenced in function "void __cdecl sf::priv::ensureExtensionsInit(void)" (?ensureExtensionsInit@priv@sf@@YAXXZ)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_std_error referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_CreateCompress referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_destroy_compress referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_stdio_dest referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_set_defaults referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_set_quality referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_start_compress referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_write_scanlines referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol _jpeg_finish_compress referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__joyGetPosEx@8 referenced in function "public: static void __cdecl sf::priv::JoystickImpl::initialize(void)" (?initialize@JoystickImpl@priv@sf@@SAXXZ)
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__joyGetDevCapsW@12 referenced in function "public: bool __thiscall sf::priv::JoystickImpl::open(unsigned int)" (?open@JoystickImpl@priv@sf@@QAE_NI@Z)
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__timeGetDevCaps@8 referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@Z)
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@Z)
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@Z)