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

Author Topic: Issues Getting SFML Setup Initally  (Read 3850 times)

0 Members and 3 Guests are viewing this topic.

poolmanjim

  • Newbie
  • *
  • Posts: 5
    • View Profile
Issues Getting SFML Setup Initally
« on: November 17, 2011, 05:47:51 pm »
I'm relatively new to Visual C++ and Code::Blocks, just so everyone is aware.

I originally started in Visual C++ Express 2010 and abandonded that as I could never get it to work. I have googled and googled and tried and tried and I am so far convinced that VC++ 2008 files cannot be made compatible with 2010.

I have recompiled the vs2008 statics and dlls as 2010 and placed them in the folder I wish to use.

I have an empty CLR Project as my base. I create a main.cpp and toss in the Clock tutorial.

Source:
Code: [Select]

#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}



I go into my Project Property Pages and set the following:

1) VC++ Directories -> Include Directories : I add my SFML1.6\include directory

2) VC++ Directories -> Library Directories : I add my SFML1.6\lib\vs2010 directory

3) Linker -> Input -> Additional Dependencies I add sfml-system-s-d.lib, sfml-window-s-d.lib, and sfml-graphics-s-d.lib

4) C/C++ -> Preprocessor : I add SFML_DYNAMIC


When I do that, I get the following. What am I doing wrong?
Code: [Select]

1>sfml-system-s-d.lib(Unicode.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::locale::locale(void)" (__imp_??0locale@std@@QAE@XZ) referenced in function __catch$?GetCurrentLocale@?A0xf7357fa0@@YA?AVlocale@std@@XZ$0
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::locale::locale(char const *,int)" (__imp_??0locale@std@@QAE@PBDH@Z) referenced in function "class std::locale __cdecl `anonymous namespace'::GetCurrentLocale(void)" (?GetCurrentLocale@?A0xf7357fa0@@YA?AVlocale@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::begin(void)const " (__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) referenced in function "public: __thiscall sf::Unicode::Text::Text(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Text@Unicode@sf@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::end(void)const " (__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) referenced in function "public: __thiscall sf::Unicode::Text::Text(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Text@Unicode@sf@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::length(void)const " (__imp_?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) referenced in function "public: __thiscall sf::Unicode::Text::Text(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Text@Unicode@sf@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::begin(void)const " (__imp_?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) referenced in function "public: __thiscall sf::Unicode::Text::Text(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0Text@Unicode@sf@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::end(void)const " (__imp_?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) referenced in function "public: __thiscall sf::Unicode::Text::Text(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0Text@Unicode@sf@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::length(void)const " (__imp_?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ) referenced in function "public: __thiscall sf::Unicode::Text::Text(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0Text@Unicode@sf@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: 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> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: 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) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::reserve(unsigned int)" (__imp_?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: 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> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::~basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)" (__imp_??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const&)" (__imp_??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::reserve(unsigned int)" (__imp_?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(struct std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::_Has_debug_it)" (__imp_??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "public: __thiscall sf::Unicode::Text::operator class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)const " (??BText@Unicode@sf@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::locale::~locale(void)" (__imp_??1locale@std@@QAE@XZ) referenced in function "void __cdecl `private: static class std::locale const & __cdecl sf::Unicode::GetDefaultLocale(void)'::`2'::`dynamic atexit destructor for 'DefaultLocale''(void)" (??__FDefaultLocale@?1??GetDefaultLocale@Unicode@sf@@CAABVlocale@std@@XZ@YAXXZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_String_val<unsigned int,class std::allocator<unsigned int> >::~_String_val<unsigned int,class std::allocator<unsigned int> >(void)" (??1?$_String_val@IV?$allocator@I@std@@@std@@QAE@XZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl std::_String_base::_Xlen(void)" (__imp_?_Xlen@_String_base@std@@SAXXZ) referenced in function "protected: bool __thiscall std::basic_string<unsigned int,struct std::char_traits<unsigned int>,class std::allocator<unsigned int> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@IU?$char_traits@I@std@@V?$allocator@I@2@@std@@IAE_NI_N@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_String_val<unsigned int,class std::allocator<unsigned int> >::_String_val<unsigned int,class std::allocator<unsigned int> >(class std::allocator<unsignedint>)" (??0?$_String_val@IV?$allocator@I@std@@@std@@IAE@V?$allocator@I@1@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl std::_String_base::_Xran(void)" (__imp_?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<unsigned char,struct std::char_traits<unsigned char>,class std::allocator<unsigned char> > & __thiscall std::basic_string<unsigned char,struct std::char_traits<unsigned char>,class std::allocator<unsigned char> >::assign(class std::basic_string<unsigned char,struct std::char_traits<unsigned char>,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@EU?$char_traits@E@std@@V?$allocator@E@2@@std@@QAEAAV12@ABV12@II@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (__imp_?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) referenced in function "class std::ctype<wchar_t> const & __cdecl std::use_facet<class std::ctype<wchar_t> >(class std::locale const &)" (??$use_facet@V?$ctype@_W@std@@@std@@YAABV?$ctype@_W@0@ABVlocale@0@@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) referenced in function "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: char * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)" (__imp_?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ) referenced in function "public: char const & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator*(void)const " (??D?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDXZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: wchar_t * __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::_Myptr(void)" (__imp_?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEPA_WXZ) referenced in function "public: wchar_t const & __thiscall std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::operator*(void)const " (??D?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WXZ)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::push_back(char)" (__imp_?push_back@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXD@Z) referenced in function "public: class std::back_insert_iterator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > & __thiscall std::back_insert_iterator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::operator=(char const &)" (??4?$back_insert_iterator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@QAEAAV01@ABD@Z)
1>sfml-system-s-d.lib(Unicode.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::push_back(wchar_t)" (__imp_?push_back@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEX_W@Z) referenced in function "public: class std::back_insert_iterator<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > > & __thiscall std::back_insert_iterator<class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > >::operator=(wchar_t const &)" (??4?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@QAEAAV01@AB_W@Z)
[/code]

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11029
    • View Profile
    • development blog
    • Email
Issues Getting SFML Setup Initally
« Reply #1 on: November 17, 2011, 06:24:13 pm »
"sfml-graphics-s-d.lib"

The 's' in there means static, but you probalby want to link dynamic (SFML_DYNAMIC).
So you either rename the libs by removing '-s' ("sfml-graphics-s-d.lib" -> "sfml-graphics-d.lib") or you declare "SFML_STATIC".
But I'm not too sure about static libs in SFML 1.6, it's a while ago...  :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

poolmanjim

  • Newbie
  • *
  • Posts: 5
    • View Profile
Issues Getting SFML Setup Initally
« Reply #2 on: November 17, 2011, 08:33:00 pm »
I want to compile them as static if at all possible. It keeps me from  having to shuffle the DLLs from my work pc and my home pc and what not.

Anyway, I have gotten past that one, It appears my dlls were miscompiled when I rebuilt for 2010. However, now I am having issues with trying to display graphics.

I know it may seem like an unnatural progression to go from clock errors to displaying text but I'm just trying to grasp the framework.

Again, I am using the default tutorial code:

Code: [Select]


////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Fonts");

    // Load a font from a file
    sf::Font MyFont;
    if (!MyFont.LoadFromFile("comic.ttf", 50))
        return EXIT_FAILURE;

    // Create a graphical string
    sf::String Hello;
    Hello.SetText("Hello !\nHow are you ?");
    Hello.SetFont(MyFont);
    Hello.SetColor(sf::Color(0, 128, 128));
    Hello.SetPosition(100.f, 100.f);
    Hello.SetRotation(15.f);
    Hello.SetSize(50.f);

    // You can also use the constructor
    sf::String Bonjour("Salut !\nComment ça va ?", sf::Font::GetDefaultFont(), 30.f);
    Bonjour.SetColor(sf::Color(200, 128, 0));
    Bonjour.SetPosition(200.f, 300.f);

    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Make the second string rotate
        Bonjour.Rotate(App.GetFrameTime() * 100.f);

        // Clear screen
        App.Clear();

        // Draw our strings
        App.Draw(Hello);
        App.Draw(Bonjour);

        // Finally, display rendered frame on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}


And I get the following relevent error:

Code: [Select]

The thread 'Win32 Thread' (0x358) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x930) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x860) has exited with code 1 (0x1).
The program '[4516] Quark.exe: Managed (v4.0.30319)' has exited with code 1 (0x1).
The program '[4516] Quark.exe: Native' has exited with code 1 (0x1).


When this happens a command line window opens for a split second, then I see a Window flicker before they both disappear. Thus far I have had very little luck with Windows. The basic open a window tutorial flopped on me pretty good.[/code]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Issues Getting SFML Setup Initally
« Reply #3 on: November 17, 2011, 08:41:33 pm »
Use your debugger ;)

Do you have a comic.ttf file in your executable's directory?

Why did you create a C++/CLI project?
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11029
    • View Profile
    • development blog
    • Email
Issues Getting SFML Setup Initally
« Reply #4 on: November 17, 2011, 08:42:03 pm »
It has to be this line (because the application compiles and runs without crashing, but outputs a 1 (=EXIT_FAILURE) instead of 0 (=EXIT_SUCCESS) so the return has to be written somewhere and this line is the only one with another 'return' call):
Code: [Select]
   if (!MyFont.LoadFromFile("comic.ttf", 50))
        return EXIT_FAILURE;


So you're missing the comic.ttf font.

I advice you to learn some more principles in programming, we can't always answer to your trivial errors.
Learn how to use the debugger and try to understand what your code is doing instead of just copying. ;-)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

poolmanjim

  • Newbie
  • *
  • Posts: 5
    • View Profile
Issues Getting SFML Setup Initally
« Reply #5 on: November 17, 2011, 08:59:26 pm »
Well thank you for the input, but that doesn't fix my "trivial" error.

Secondly, I don't think I understand what you mean by "Learn how to use the debugger." I'm not getting any clear errors, it simply isn't working. As far as I understood, I was using my debugger. I guess you mean dig through my manifests?

I'm not a programmer, I am still learning to understand the interfaces I am faced with and I am mostly seeking guidence. Sorry I bothered you all in my attempts.

EDIT:

Sorry I missed the last half of the first reply to my second question (confusing, huh?).

It is an empty project. I'm just trying to get a feel for the stuff beyond Console apps. I have been poking around with trying to make a console app for awhile and I came to conclusion it would be easier to do it in a Windowed application. Hence the jump to SFML.

If you have other recommendations to learning rather than poking around until I am more comfortable, please suggest them. I'm just trying to figure out what is next here.

poolmanjim

  • Newbie
  • *
  • Posts: 5
    • View Profile
Issues Getting SFML Setup Initally
« Reply #6 on: November 17, 2011, 10:08:33 pm »
I guess I should start with a bit of an apology. Sometimes I need a good kick in the arse to stop and think. Sorry for losing my top some there.

I was putting the comic.tff in the wrong directory to explain my issue.

I normally do not post when I have questions, I just trial and error, trial and error until it is figured out. This time, I was frustrated already from having so many issues with getting the libraries and dll's to build that I was just fed up with working any harder on the issue.

When you said debug, you meant use breaks. :) I normally use them, liberally, I just had never witnessed errors like that before and they had confused me. The application was compiling, then crashing when it ran. Forgive me for being a bit rude there especially, I am much smarter than that when I am not in a rough mood. :)

I'm using a CLI app (empty project) because I was under the impression Win32 apps used the WinMain method instead of the main method. All the examples, code, etc. use main. I figured it was just how it was.

Now, I finally have two good questions, ones that arn't build purely around well written tutorials.

1) When I recompile for 2010, I come up short on the dynamic files. I have all the sfml-xx-s-d.lib files but none of the sfml-xx-d.lib files. They show up in the original '08 folder but not in the new one.

Am I doing something wrong? Is this expected?

2) Seeing as I am using a CLI project type. Should I be using a different VS project type? If I am doing right right, how do I keep it from opening a CLI window in the background?

Thank you. I know these are newbie questions but that is exactly what I am.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Issues Getting SFML Setup Initally
« Reply #7 on: November 17, 2011, 10:26:35 pm »
Quote
1) When I recompile for 2010, I come up short on the dynamic files. I have all the sfml-xx-s-d.lib files but none of the sfml-xx-d.lib files. They show up in the original '08 folder but not in the new one.

You must compile the "DLL Debug" configuration to get -d.lib files.

Quote
2) Seeing as I am using a CLI project type. Should I be using a different VS project type? If I am doing right right, how do I keep it from opening a CLI window in the background?

C++/CLI is a different language, not just a different option.
sfml-main.lib is the solution to your WinMain entry point problem (basically, it defines a WinMain which calls your own main)..
Laurent Gomila - SFML developer

poolmanjim

  • Newbie
  • *
  • Posts: 5
    • View Profile
Issues Getting SFML Setup Initally
« Reply #8 on: November 17, 2011, 10:41:18 pm »
Thank you Laurent.

However, I have been compiling the Debug DLL option. I have a full set of DLLs that are dated today at the time I compiled them.

Thank you for the help and patience.