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.


Topics - wademcgillis

Pages: [1]
1
General / [UNRESOLVED] [GAVE UP] SFML 2.0 Freetype issues
« on: April 08, 2013, 07:37:08 pm »
SFML 2.0 RC keeps crashing when I use sf::Mouse::isButtonPressed. I thought updated to a newer version would fix this, but it gave me more issues with sndfile and freetype. I eventually gave up and resorted to using the windowing events. The end.




Hello. My game fails to start up now because freetype is unable to be found, this was using the latest code from github.

Quote
Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: @executable_path/../Frameworks/freetype.framework/Versions/A/freetype
  Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/AstronautEditor-eawjbzqshnxniyhehqmuxzwhpsrr/Build/Products/Release/AstronautEditor.app/Contents/MacOS/../Frameworks/sfml-graphics.framework/Versions/2.0.0/sfml-graphics
  Reason: image not found

Yes, I am using the freetype framework that comes with SFML.
Quote
otool -L sfml-graphics
sfml-graphics:
   @executable_path/../Frameworks/sfml-graphics.framework/Versions/2.0.0/sfml-graphics (compatibility version 2.0.0, current version 2.0.0)
   @executable_path/../Frameworks/sfml-window.framework/Versions/2.0.0/sfml-window (compatibility version 2.0.0, current version 2.0.0)
   @executable_path/../Frameworks/sfml-system.framework/Versions/2.0.0/sfml-system (compatibility version 2.0.0, current version 2.0.0)
   @executable_path/../Frameworks/freetype.framework/Versions/A/freetype (compatibility version 17.0.0, current version 17.0.0)
   /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
   /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.25.0)
   /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1138.51.0)
   /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
   /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)

I have tried using the frameworks built with the Makefile and built in Xcode, to no avail. Yes, the framework is in the copy frameworks build phase.[/s]

2
General / Linking Error (only with Network)
« on: June 27, 2012, 09:58:20 pm »
Hello. I'm using the SFML 2.0 RC static libraries, with everything set to /MD

This code compiles fine. No linking issues.
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#pragma comment(lib,"sfml-network-s.lib")
#pragma comment(lib,"sfml-graphics-s.lib")
#pragma comment(lib,"sfml-window-s.lib")
#pragma comment(lib,"sfml-system-s.lib")

int main()
{
        //sf::Http h("http://games.wademcgillis.com/astronot/update.php?action=md5&type=win",80);
        sf::Image bob;
        return 0;
}
 

This code causes the linker to freak out:
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#pragma comment(lib,"sfml-network-s.lib")
#pragma comment(lib,"sfml-graphics-s.lib")
#pragma comment(lib,"sfml-window-s.lib")
#pragma comment(lib,"sfml-system-s.lib")

int main()
{
        sf::Http h("http://games.wademcgillis.com/astronot/update.php?action=md5&type=win",80);
        sf::Image bob;
        return 0;
}
 

Quote
Compiling...
main.cpp
Linking...
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(class std::basic_string,class std::allocator > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in libcpmt.lib(string.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string,class std::allocator >::~basic_string,class std::allocator >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: void __thiscall std::basic_string,class std::allocator >::push_back(char)" (?push_back@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXD@Z) already defined in sfml-system-s.lib(String.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::basic_ostream > & __thiscall std::basic_ostream >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: void __thiscall std::basic_ostream >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: void __thiscall std::basic_ios >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::_String_iterator,class std::allocator > __thiscall std::basic_string,class std::allocator >::end(void)" (?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) already defined in sfml-graphics-s.lib(ImageLoader.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::_String_iterator,class std::allocator > __thiscall std::basic_string,class std::allocator >::begin(void)" (?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) already defined in sfml-graphics-s.lib(ImageLoader.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "protected: void __thiscall std::basic_string,class std::allocator >::_Tidy(bool,unsigned int)" (?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: void __thiscall std::basic_string,class std::allocator >::reserve(unsigned int)" (?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z) already defined in sfml-system-s.lib(String.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "bool __cdecl std::operator==,class std::allocator >(class std::basic_string,class std::allocator > const &,char const *)" (??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z) already defined in sfml-graphics-s.lib(ImageLoader.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::basic_string,class std::allocator > __thiscall std::basic_string,class std::allocator >::substr(unsigned int,unsigned int)const " (?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z) already defined in sfml-graphics-s.lib(ImageLoader.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: void __thiscall std::allocator::deallocate(char *,unsigned int)" (?deallocate@?$allocator@D@std@@QAEXPADI@Z) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "class std::basic_ostream > & __cdecl std::operator<<,class std::allocator >(class std::basic_ostream > &,class std::basic_string,class std::allocator > const &)" (??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) already defined in sfml-graphics-s.lib(ImageLoader.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(void)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in sfml-system-s.lib(Err.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::basic_ostream > & __thiscall std::basic_ostream >::operator<<(class std::basic_ostream > & (__cdecl*)(class std::basic_ostream > &))" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "class std::basic_ostream > & __cdecl std::endl(class std::basic_ostream > &)" (?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) already defined in sfml-graphics-s.lib(Image.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: char * __thiscall std::allocator::allocate(unsigned int)" (?allocate@?$allocator@D@std@@QAEPADI@Z) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::assign(char const *,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z) already defined in main.obj
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::_String_const_iterator,class std::allocator > __thiscall std::basic_string,class std::allocator >::end(void)const " (?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ) already defined in sfml-system-s.lib(String.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::_String_const_iterator,class std::allocator > __thiscall std::basic_string,class std::allocator >::begin(void)const " (?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ) already defined in sfml-system-s.lib(String.obj)
msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in sfml-system-s.lib(Err.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: __invalid_parameter_noinfo already defined in LIBCMT.lib(invarg.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: _tolower already defined in LIBCMT.lib(tolower.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: _isdigit already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: _memmove_s already defined in LIBCMT.lib(memmove_s.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl _AtModuleExit(void (__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ@Z) already defined in msvcprt.lib(locale0_implib.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(locale0.obj) : error LNK2005: __Fac_tidy already defined in msvcprt.lib(locale0_implib.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprt.lib(locale0_implib.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(locale0.obj) : error LNK2005: "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::operator=(char const *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string,class std::allocator > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprt.lib(MSVCP90.dll)
libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprt.lib(MSVCP90.dll)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
E:\shit\Release\shit.exe : fatal error LNK1169: one or more multiply defined symbols found

The problem is that I can't compile my project while using sfml-network, and any use of /NODEFAULTLIB causes the linker to complain that things are missing.

How do I fix this?

Edit:
I should also add that leaving everything as /MD causes linking issues with the first code bit.

3
Graphics / Rendering in a separate thread in OS X
« on: May 24, 2012, 04:07:53 am »
When I try to render in a separate thread in OS X, it complains that I can't do that in a worker thread.

How do I resolve this?

"Cannot fetch event from a worker thread. (OS X restriction)"

I mainly want to do this so the app doesn't freeze when I click on the menu bar.

4
General / SFML2 doesn't link - VS 2008
« on: October 12, 2011, 08:21:14 pm »
:evil:

My project no longer links when I use SFML2 in Visual Studio 2008

Yes, I am linking to the SFML2 static libs.
Yes, the files do exist.

Code: [Select]

1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Shape __cdecl sf::Shape::Rectangle(float,float,float,float,class sf::Color const &,float,class sf::Color const &)" (__imp_?Rectangle@Shape@sf@@SA?AV12@MMMMABVColor@2@M0@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Shape __cdecl sf::Shape::Line(float,float,float,float,float,class sf::Color const &,float,class sf::Color const &)" (__imp_?Line@Shape@sf@@SA?AV12@MMMMMABVColor@2@M0@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Drawable::SetColor(class sf::Color const &)" (__imp_?SetColor@Drawable@sf@@QAEXABVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Drawable::SetScale(float,float)" (__imp_?SetScale@Drawable@sf@@QAEXMM@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Drawable::SetPosition(float,float)" (__imp_?SetPosition@Drawable@sf@@QAEXMM@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual unsigned int __thiscall sf::RenderWindow::GetHeight(void)const " (__imp_?GetHeight@RenderWindow@sf@@UBEIXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual unsigned int __thiscall sf::RenderWindow::GetWidth(void)const " (__imp_?GetWidth@RenderWindow@sf@@UBEIXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(void)" (__imp_??0RenderWindow@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Show(bool)" (__imp_?Show@Window@sf@@QAEX_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::PollEvent(class sf::Event &)" (__imp_?PollEvent@Window@sf@@QAE_NAAVEvent@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::IsOpened(void)const " (__imp_?IsOpened@Window@sf@@QBE_NXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Create(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::ContextSettings const &)" (__imp_?Create@Window@sf@@QAEXVVideoMode@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUContextSettings@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class sf::Rect<int> const &)" (__imp_?LoadFromFile@Texture@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$Rect@H@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" (__imp_??0Texture@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::SetSubRect(class sf::Rect<int> const &)" (__imp_?SetSubRect@Sprite@sf@@QAEXABV?$Rect@H@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::SetTexture(class sf::Texture const &,bool)" (__imp_?SetTexture@Sprite@sf@@QAEXABVTexture@2@_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(void)" (__imp_??0Sprite@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Color const sf::Color::Red" (__imp_?Red@Color@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &)" (__imp_?Draw@RenderTarget@sf@@QAEXABVDrawable@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::Clear(class sf::Color const &)" (__imp_?Clear@RenderTarget@sf@@QAEXABVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Shape::~Shape(void)" (__imp_??1Shape@sf@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sprite::~Sprite(void)" (__imp_??1Sprite@sf@@UAE@XZ)

5
Window / Set RenderWindow title.
« on: May 11, 2010, 03:29:34 am »
I look at the documentation for this, but I couldn't find a way to change the title of a RenderWindow. Is this possible at all?

SetIcon  (unsigned int Width, unsigned int Height, const Uint8 *Pixels)
    Change the window's icon.



Come on? No "SetTitle" ?[/code]

6
Window / Mouse leaving the window causes button issue
« on: May 10, 2010, 03:44:32 pm »
I hold down the left mouse button and move the mouse outside an SFML window, then I release the left mouse button. When I move the mouse back into the window, Input.IsMouseButtonDown(sf::Mouse::Left) returns true!

Why?

7
Graphics / 512x512 texture slowing game down
« on: February 13, 2010, 07:22:30 pm »
SFML's graphics rendering is supposed to be faster than Game Maker, right?

Well, I'm trying to display two 512x512 png images on the screen, and the framerate drops drastically.


http://www.wademcgillis.com/downloads/stupidcode.zip

8
Graphics / Sprites appear white in Mac OS X
« on: October 30, 2009, 07:27:18 pm »
For my final project in C++ class, I'm making a TDS using SFML. However, on my mac, sprites show up white.





It's the same code and same images on both machines. I'm using SFML 1.5[/img]

9
General / Can't Static Link Ubuntu 8.10
« on: October 02, 2009, 12:25:03 am »
Whenever I try to static link in Ubuntu 8.10,

Quote

/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(Window.o)||In function `sf::Window::Display()':|
Window.cpp:(.text+0x633)||undefined reference to `sf::Sleep(float)'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(VideoModeSupport.o)||In function `sf::priv::VideoModeSupport::GetDesktopVideoMode()':|
VideoModeSupport.cpp:(.text+0xe0)||undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp:(.text+0xf9)||undefined reference to `XRRConfigCurrentConfiguration'|
VideoModeSupport.cpp:(.text+0x10f)||undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp:(.text+0x169)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(VideoModeSupport.o)||In function `sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)':|
VideoModeSupport.cpp:(.text+0x1f9)||undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp:(.text+0x216)||undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp:(.text+0x35f)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::CleanUp()':|
WindowImplX11.cpp:(.text+0xac8)||undefined reference to `XRRGetScreenInfo'|
WindowImplX11.cpp:(.text+0xae1)||undefined reference to `XRRConfigCurrentConfiguration'|
WindowImplX11.cpp:(.text+0xb2e)||undefined reference to `XRRSetScreenConfig'|
WindowImplX11.cpp:(.text+0xb39)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::SwitchToFullscreen(sf::VideoMode const&)':|
WindowImplX11.cpp:(.text+0x1c6d)||undefined reference to `XRRGetScreenInfo'|
WindowImplX11.cpp:(.text+0x1c8a)||undefined reference to `XRRConfigCurrentConfiguration'|
WindowImplX11.cpp:(.text+0x1ca8)||undefined reference to `XRRConfigSizes'|
WindowImplX11.cpp:(.text+0x1d2f)||undefined reference to `XRRSetScreenConfig'|
WindowImplX11.cpp:(.text+0x1d47)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::~FontLoader()':|
FontLoader.cpp:(.text+0xf2f)||undefined reference to `FT_Done_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::~FontLoader()':|
FontLoader.cpp:(.text+0xf5f)||undefined reference to `FT_Done_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::CreateBitmapFont(FT_FaceRec_*, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':|
FontLoader.cpp:(.text+0x10d8)||undefined reference to `FT_Set_Pixel_Sizes'|
FontLoader.cpp:(.text+0x114d)||undefined reference to `FT_Select_Charmap'|
FontLoader.cpp:(.text+0x11c7)||undefined reference to `FT_Load_Char'|
FontLoader.cpp:(.text+0x11e7)||undefined reference to `FT_Get_Glyph'|
FontLoader.cpp:(.text+0x1215)||undefined reference to `FT_Glyph_To_Bitmap'|
FontLoader.cpp:(.text+0x1754)||undefined reference to `FT_Done_Glyph'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::FontLoader()':|
FontLoader.cpp:(.text+0x1b59)||undefined reference to `FT_Init_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::FontLoader()':|
FontLoader.cpp:(.text+0x1d79)||undefined reference to `FT_Init_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::LoadFontFromMemory(char const*, unsigned int, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':|
FontLoader.cpp:(.text+0x1f22)||undefined reference to `FT_New_Memory_Face'|
FontLoader.cpp:(.text+0x1fe4)||undefined reference to `FT_Done_Face'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::LoadFontFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':|
FontLoader.cpp:(.text+0x219d)||undefined reference to `FT_New_Face'|
FontLoader.cpp:(.text+0x2293)||undefined reference to `FT_Done_Face'|
||=== Build finished: 31 errors, 21 warnings ===|

10
Graphics / Text Drawing is SLOWWWW!
« on: September 09, 2009, 09:44:14 pm »
Why is it so slow?

Why does drawing the text dynamically slow it down so much?

Code: [Select]

void draw_text(int x, int y, char* text)
    {
    sf::String displayText = sf::String();
    displayText.SetColor(sf::Color(globalsys::current_color->getRed(),globalsys::current_color->getGreen(),
        globalsys::current_color->getBlue(),255*globalsys::current_alpha));
    displayText.SetFont(globalsys::current_font.font);
    displayText.SetSize(globalsys::current_font.size);
    if (view_enabled)
        displayText.Move(x-view_xview,y-view_yview);
    else
        displayText.Move(x,y);
displayText.SetText(text);
    App.Draw(displayText);
    }

11
Graphics / Converting Image to GLuint (a texture)
« on: August 31, 2009, 04:10:38 am »
Code: [Select]

GLuint ScreenImage()
    {
    sf::Image img;
    img.CopyScreen(App,sf::IntRect(0,0,512,256));
    const sf::Uint8* ptr = img.GetPixelsPtr();
    GLuint tex;
    glGenTextures(1, &tex);
    glBindTexture(GL_TEXTURE_2D, tex);
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,512,256,0,GL_RGBA,GL_UNSIGNED_INT,ptr);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
    glBindTexture(GL_TEXTURE_2D, 0);
    return tex;
    }

what am I doing wrong?

12
General / Static Linking
« on: August 30, 2009, 06:52:14 pm »
Is it possible to static link in Ubuntu 8.10?

13
Window / Window Non-Resizable
« on: August 29, 2009, 09:53:29 pm »
How do I make a window non-resizable?

14
Graphics / Can't load sf::Sprite from a function
« on: August 01, 2009, 05:30:13 pm »
Code: [Select]
#include <SFML/Graphics.hpp>
#include <string>
using namespace std;
sf::RenderWindow App;

sf::Sprite load_sprite(string path)
    {
    sf::Sprite test_sprite;
    sf::Image img;
    img.LoadFromFile(path);
    test_sprite.SetImage(img);
    return test_sprite;
    }

//#define fromFunction // Un-comment the #define to make the image load incorrectly.

#ifdef _WIN32
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
#else
int main()
#endif
    {
    App.Create(sf::VideoMode(640, 480, 32), "SFML Window");
    sf::Sprite spr;
    #ifdef fromFunction
        spr = load_sprite("image.bmp");
    #else
        sf::Image bobf;
        bobf.LoadFromFile("image.bmp");
        spr.SetImage(bobf);
    #endif
    spr.SetCenter(120,80);
    spr.SetScale(1,1);
    spr.SetColor(sf::Color(255,255,255));
    spr.SetX(320);
    spr.SetY(240);
    bool loopin = true;
    while(loopin)
        {
        sf::Event Event;
        while (App.GetEvent(Event))
            {
            if ((Event.Type == sf::Event::Closed) || ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape)))
                {
                App.Close();
                loopin = false;
                break;
                }
            }
        App.Draw(spr);
        App.Display();
        sf::Clock clock;
        clock.Reset();
        while(clock.GetElapsedTime() < 1/60)
            {}
        }
return EXIT_SUCCESS;
    }

Output when fromFunction is defined

Output when fromFunction is NOT defined


edit:
fixed something. but the problem still occurs

Pages: [1]