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 - robvleugel

Pages: [1]
1
General / FindSFML cannot find SFML
« on: December 07, 2013, 02:31:58 pm »
Hello all,

I always used SFML with Visual studio without problems, but now recently I want to change from a VS environment to Cmake so I can develop both on my windows PC and my linux laptop.

The problem arises when using the find_package(SFML 2 REQUIRED system window graphics network audio)
I've added the FindSFML.cmake file, but I get the following error when trying to run cmake:

"Cmake Error at cmake_modules/FindSFML.cmake:307 (message):
   Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY etc. etc.

I installed SFML in C:\Project Files (x86)\, I've set a system variable SFML_ROOT to "C:\Project Files (x86)\SFML". I'm clueless to why it cannot find this directory. This directory contains the complete content of the SFML-2.1-windows-vc11-64bits.zip file that I just downloaded, did I have to do more to install SFML?
(E.g. System.hpp is located in "C:\Program Files (x86)\SFML\include\SFML")

Kind regards,
Rob

2
Audio / Not playing sound from function
« on: May 18, 2012, 09:33:49 pm »
Hello,

I am having some problems with the sfml audio package. My code to load the sound is the code below:

#include <SFML\System.hpp>
#include <SFML\Audio.hpp>

void Playsound()
{
        sf::Sound sound;
        sf::SoundBuffer sbuffer;
        sbuffer.loadFromFile("boom.wav");
        sound.setBuffer(sbuffer);
        sound.play();
}

int main()
{
        Playsound();
        sf::Clock clock; while(clock.getElapsedTime().asSeconds() < 5) {}
        return 0;
}
 

If I move the code from Playsound() to main it works. It doesn't work from within a function.
I mean this makes it hard to play a sound isn't it, what am I doing wrong?

3
Window / Window unhandled exception error
« on: March 31, 2012, 02:13:56 pm »
Ugh now what, everything seemed to work fine yesterday, but today started to open my game again and I suffered from another breakpoint memory error. I deleted basicly all of my game code and it comes down to the code below:

It breaks at WglContext.cpp
Code: [Select]
void WglContext::display()
{
    if (m_deviceContext && m_context)
        SwapBuffers(m_deviceContext);
}


Output window:

+      m_context   0x00010002 {unused=0 }   HGLRC__ *
+      m_deviceContext   0x590118ed {unused=??? }   HDC__ *
+      this   0x09224fd0 {m_window=0x0010085a m_deviceContext=0x590118ed m_context=0x00010002 ...}   sf::priv::WglContext * const

My code:

Code: [Select]
#include <SFML\Graphics.hpp>

int main()
{
sf::RenderWindow m_app;
m_app.create(sf::VideoMode(500, 500, 32), "MyProgram");

while(true)
{
m_app.clear(sf::Color(65,5,23));
m_app.display();
}

return 0;
}


Because this code is so basic (and because the example program on the documentation website gives me the same error), it can't be my code right?
I downloaded the newest snapshot of SFML2 and build/installed it but it still gives me the same error.
I'm pretty sure I'm linking with the static debug libraries correctly, as I did not change anything and it used to work fine til today. Removing the "m_app.display();" makes it run.

Linking with:
sfml-system-s-d.lib;sfml-window-s-d.lib;sfml-graphics-s-d.lib;libpq.lib;%(AdditionalDependencies)


What is going on here? I'm completely clueless.


4
Window / Unhandled exception on window creation
« on: February 28, 2012, 07:12:34 pm »
[Using the latest 2.0 snapshot]

I'm not sure what I'm doing wrong here.

It compiles fine, but when running in debug mode I get:
"Unhandled exception at 0x77a322b2 in myprogram.exe: 0xC0000005: Access violation writing location 0x00000004."

It breaks at the GraphicsManager::GraphicsManager() constructor.
If I take out all code from the GraphicsManager class and put it all in main.cpp I get no errors.


Main.cpp
Code: [Select]


#include "GraphicsManager.h"

GraphicsManager gfx;

int main(int argc, char**argv)
{

gfx.Init();

return 0;
}


GraphicsManager.h
Code: [Select]


#include <SFML\Graphics.hpp>

class GraphicsManager
{
private:
int m_screen_x,m_screen_y,m_bit;
bool m_fullscreen
std::string m_winCaption;

sf::RenderWindow m_app;

public:
GraphicsManager();
~GraphicsManager() {m_app.Close();}

void Init();

};


GraphicsManager.cpp
Code: [Select]

#include "GraphicsManager.h"


GraphicsManager::GraphicsManager()
:m_fullscreen(false),m_screen_x(0),m_screen_y(0),m_bit(0),m_winCaption("not set")
{

}
void GraphicsManager::Init()
{
sf::VideoMode DesktopMode = sf::VideoMode::GetDesktopMode();
m_bit = DesktopMode.GetDesktopMode().BitsPerPixel;
m_screen_x = DesktopMode.GetDesktopMode().Width;
m_screen_y = DesktopMode.GetDesktopMode().Height;
m_winCaption = "MyProgram";
m_fullscreen = true;

m_app.Create(sf::VideoMode(m_screen_x, m_screen_y, m_bit), m_winCaption, sf::Style::Fullscreen);

}

5
General / SFML linking problems
« on: February 19, 2012, 10:52:34 am »
I've always used SFML 1.6 and everything worked fine.
Recently I tried to fool around in Linux and build the latest SFML 2.0 from the repository, everything works fine.

But now I'm trying to make the switch from 1.6 to 2.o on Windows and I'm running into some problems using Visual Studio 2011 Express.

I've build the libraries with cmake. I want only the static ones, so I've configured with BUILD_SHARED_LIBS to FALSE, STATIC_STD_LIBS to TRUE, and CMAKE_BUILD_TYPE to both Debug and Release.
I've obtained the sfml-xxx-s.lib and sfml-xxx-s-d.lib.
I've set the correct paths and included the sfml-system-s-d.lib to my project under debug settings.

When I compile the following code:
Code: [Select]

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

int main()
{
sf::Clock myClock;
while(myClock.GetElapsedTime().AsSeconds() < 5) {}
    return 0;
}


It gives me the following errors:
Code: [Select]

1>  LINK : C:\Dev\Projects\SFML2 test\Debug\SFML2 test.exe not found or not built by the last incremental link; performing full link
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall sf::Time::AsSeconds(void)const " (__imp_?AsSeconds@Time@sf@@QBEMXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Time __thiscall sf::Clock::GetElapsedTime(void)const " (__imp_?GetElapsedTime@Clock@sf@@QBE?AVTime@2@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Clock::Clock(void)" (__imp_??0Clock@sf@@QAE@XZ) referenced in function _main
1>C:\Dev\Projects\SFML2 test\Debug\SFML2 test.exe : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Than I've read I had to set the SFML_STATIC, so I did:

Code: [Select]

1>------ Build started: Project: SFML2 test, Configuration: Debug Win32 ------
1>  main.cpp
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-system-s-d.lib(Clock.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Clock.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Time.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Time.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ClockImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ClockImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>  SFML2 test.vcxproj -> C:\Dev\Projects\SFML2 test\Debug\SFML2 test.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


Ok, it compiles. But I generally don't like to see warnings :)
So what do they mean? I've read basicly all of the tutorials and youtube videos on how to set up sfml and I can't seem to find this problem.


Now I've compiled a little fancier program:

Code: [Select]

#include <iostream>
#include <SFML\System.hpp>
#include <SFML\Graphics.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    // Start game loop
    while (App.IsOpen())
    {
        // Process events
        sf::Event Event;
        while (App.PollEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear the screen (fill it with black color)
        App.Clear();

        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}


I've added the sfml-system-s-d.lib,sfml-window-s-d.lib and sfml-graphics-s-d.lib as additional dependencies. I get the following error:


Code: [Select]

1>------ Build started: Project: SFML2 test, Configuration: Debug Win32 ------
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in sfml-window-s-d.lib(VideoMode.cpp.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in sfml-window-s-d.lib(VideoMode.cpp.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in sfml-window-s-d.lib(VideoMode.cpp.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in sfml-graphics-s-d.lib(GLCheck.cpp.obj)
1>libcpmtd.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 msvcprtd.lib(locale0_implib.obj)
1>libcpmtd.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 msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.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 msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.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 msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.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 msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.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 msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP100D.dll)
1>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP100D.dll)
1>LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf_s already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
1>LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(_file.obj) : error LNK2005: __lock_file already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(_file.obj) : error LNK2005: __unlock_file already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR100D.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:\Dev\Projects\SFML2 test\Debug\SFML2 test.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


When I set Code Generation>RunTime Library in VS to Multi-threaded Debug (/MTd) (I have no idea when this does and what effect's it will have on my program)

Code: [Select]

1>------ Build started: Project: SFML2 test, Configuration: Debug Win32 ------
1>  main.cpp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-system-s-d.lib(Clock.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Clock.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Err.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Err.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Lock.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Lock.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Mutex.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Mutex.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Sleep.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Sleep.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ThreadLocal.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ThreadLocal.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Time.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Time.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ClockImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ClockImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(MutexImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(MutexImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(SleepImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ThreadLocalImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ThreadLocalImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(GlContext.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(GlContext.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(GlResource.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(GlResource.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(JoystickManager.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(JoystickManager.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(VideoMode.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(VideoMode.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(Window.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(Window.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(WindowImpl.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(WindowImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(WglContext.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(WglContext.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(JoystickImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(VideoModeImpl.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(WindowImplWin32.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Color.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Color.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(GLCheck.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(GLCheck.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Image.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Image.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(ImageLoader.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(RenderTarget.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderWindow.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(RenderWindow.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Shader.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Texture.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Texture.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(TextureSaver.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(TextureSaver.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Transform.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Transform.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(View.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(View.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Vertex.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Vertex.cpp.obj)' or at 'C:\Dev\Projects\SFML2 test\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>  SFML2 test.vcxproj -> C:\Dev\Projects\SFML2 test\Debug\SFML2 test.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped =========



It compiles, it works but still lots of warnings. Is this normal?
Does anyone have a clue how to get rid of them?
I've spend hours already but can't seem to find a solution.


Greetings,
Rob

6
General / SFML 2.0 in Linux giving linking errors
« on: February 12, 2012, 06:27:55 pm »
Hello,

I've been using SFML (1.6) on Windows for a while now and I love it!
However, I'm having trouble setting it up in Linux (ubuntu 11.10). I
m facing two problems.
I downloaded the latest 2.0 version from github, ran cmake and make to build the libraries. The first problem that I encountered is that I can't seem to make the libsfml-XXX-s-d.a files. For instance, I have libsfml-system.so,libsfml-system.so.2.0,libsfml-system-d.so,libsfml-system-d.so.2.0 and sfmlsystem-d.a.

I find this strange, I did configure with CMake in Debug with BUILD_SHARED_LIBS disabled prior to running make, I tried it again in case I forgot to ran make with this configuration but still no *-s-d.a files.

Next, when I try to compile the code below, it gives me the following errors:

Code: [Select]
Compiling: src/main.cpp
/home/robvleugel/Dev/Projects/XML Test/src/main.cpp: In function ‘int main(int, char**)’:
/home/robvleugel/Dev/Projects/XML Test/src/main.cpp:11:12: error: ‘class sf::Window’ has no member named ‘IsOpened’
/home/robvleugel/Dev/Projects/XML Test/src/main.cpp:14:16: error: ‘class sf::Window’ has no member named ‘GetEvent’
/home/robvleugel/Dev/Projects/XML Test/src/main.cpp:21:77: error: ‘sf::Key’ has not been declared
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings



I hope anyone knows a solution for my problems.
Keep up the good work!

Greetings, Rob


Code: [Select]

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

int main(int argc, char** argv) {

sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");


while (App.IsOpened())
{
    sf::Event Event;
    while (App.GetEvent(Event))
    {
        // Window closed
        if (Event.Type == sf::Event::Closed)
            App.Close();

        // Escape key pressed
        if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
            App.Close();
    }
}

return 0;
}


7
Window / Window resize
« on: December 28, 2011, 05:55:49 pm »
Hello,

I'm writing a small game, I set up a window and placed some buttons on it. The buttons are sf::sprite objects using an sf::image of a button, some .PNG image file. At this moment, the buttons use a fixed X and Y position. I can click the button and everything works fine.

However, if the window is resized, the buttons stretch out, which is actually what I want to happen. However, the position checking uses the button's SF::image width and height to check for button presses, but these are no longer accurate after they are being resized.

My question is, why are the buttons being stretched? Although I want this to happen I'm not sure what actually causes it right now.
Is this happening automaticly for sf:sprite objects? And how could I solve my problem about the images being scaled, but not the sprite.GetPosition() and GetHeight()?

Do I need to use a virtual screen or something? And if so, what kind of class to I need to use for this virtual screen, another sf::RenderWindow or can I use a sf::image for that purpose?

Greetings,
Rob

Pages: [1]
anything