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

Show Posts

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


Messages - atomen

Pages: [1] 2
1
C / Problem configuring csfml2 with cmake
« on: June 11, 2011, 07:49:08 pm »
Quote from: "Laurent"
The message says it all: you're tring to link CSFML 2 to SFML 1. You must of course use SFML 2.

Now, excuse me if I sound dumb, but does the latest snapshot even include SFML 1?
The PostFX class/header and source files doesn't even exists, only the shader class.

2
C / Problem configuring csfml2 with cmake
« on: June 11, 2011, 12:18:11 pm »
Quote from: "Laurent"
Should be fixed now.
Thank you for fixing that!

Though I do still have one problem, when I try to compile the solution now, I receive this error (latest snapshot):
Code: [Select]
CMake Error at %APPDATA%/CMake/share/cmake-2.8/Modules/FindSFML.cmake:153 (message):
  SFML found but version too low (requested: 2.0, found: 1.x)
Call Stack (most recent call first):
  src/SFML/CMakeLists.txt:22 (find_package)

3
C / Problem configuring csfml2 with cmake
« on: June 10, 2011, 11:33:29 pm »
Quote from: "Laurent"
Hum... did you actually read my previous answer? :|

After further research, no I did not.

Though now I have an additional problem, this is the output when I attempt to compile the C binding: (long text, scrollbars anyhow?)
Code: [Select]
CMake Error at C:/Program Files (x86)/CMake/share/cmake-2.8/Modules/FindSFML.cmake:52 (math):
  math cannot parse the expression:
  "////////////////////////////////////////////////////////////

  //

  // SFML - Simple and Fast Multimedia Library

  // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)

  //

  // This software is provided 'as-is', without any express or implied
  warranty.

  // In no event will the authors be held liable for any damages arising from
  the use of this software.

  //

  // Permission is granted to anyone to use this software for any purpose,

  // including commercial applications, and to alter it and redistribute it
  freely,

  // subject to the following restrictions:

  //

  // 1.  The origin of this software must not be misrepresented;

  // you must not claim that you wrote the original software.

  // If you use this software in a product, an acknowledgment

  // in the product documentation would be appreciated but is not required.

  //

  // 2.  Altered source versions must be plainly marked as such,

  // and must not be misrepresented as being the original software.

  //

  // 3.  This notice may not be removed or altered from any source
  distribution.

  //

  ////////////////////////////////////////////////////////////

 

  #ifndef SFML_CONFIG_HPP

  #define SFML_CONFIG_HPP

 

  ////////////////////////////////////////////////////////////

  // Identify the operating system

  ////////////////////////////////////////////////////////////

  #if defined(_WIN32) || defined(__WIN32__)

 

      // Windows
      #define SFML_SYSTEM_WINDOWS
      #ifndef WIN32_LEAN_AND_MEAN
          #define WIN32_LEAN_AND_MEAN
      #endif
      #ifndef NOMINMAX
          #define NOMINMAX
      #endif

 

  #elif defined(linux) || defined(__linux)

 

      // Linux
      #define SFML_SYSTEM_LINUX

 

  #elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) ||
  defined(Macintosh)

 

      // MacOS
      #define SFML_SYSTEM_MACOS

 

  #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)

 

      // FreeBSD
      #define SFML_SYSTEM_FREEBSD

 

  #else

 

      // Unsupported system
      #error This operating system is not supported by SFML library

 

  #endif

 

 

  ////////////////////////////////////////////////////////////

  // Define a portable debug macro

  ////////////////////////////////////////////////////////////

  #if !defined(NDEBUG)

 

      #define SFML_DEBUG

 

  #endif

 

 

  ////////////////////////////////////////////////////////////

  // Define portable import / export macros

  ////////////////////////////////////////////////////////////

  #if defined(SFML_SYSTEM_WINDOWS)

 

      #ifdef SFML_DYNAMIC

 

          // Windows platforms
          #ifdef SFML_EXPORTS

 

              // From DLL side, we must export
              #define SFML_API __declspec(dllexport)

 

          #else

 

              // From client application side, we must import
              #define SFML_API __declspec(dllimport)

 

          #endif

 

          // For Visual C++ compilers, we also need to turn off this annoying C4251 warning.
          // You can read lots ot different things about it, but the point is the code will
          // just work fine, and so the simplest way to get rid of this warning is to disable it
          #ifdef _MSC_VER

 

              #pragma warning(disable : 4251)

 

          #endif

 

      #else

 

          // No specific directive needed for static build
          #define SFML_API

 

      #endif

 

  #else

 

      // Other platforms don't need to define anything
      #define SFML_API

 

  #endif

 

 

  ////////////////////////////////////////////////////////////

  // Define portable fixed-size types

  ////////////////////////////////////////////////////////////

  #include <climits>

 

  namespace sf

  {

      // 8 bits integer types
      #if UCHAR_MAX == 0xFF
          typedef signed   char Int8;
          typedef unsigned char Uint8;
      #else
          #error No 8 bits integer type for this platform
      #endif

 

      // 16 bits integer types
      #if USHRT_MAX == 0xFFFF
          typedef signed   short Int16;
          typedef unsigned short Uint16;
      #elif UINT_MAX == 0xFFFF
          typedef signed   int Int16;
          typedef unsigned int Uint16;
      #elif ULONG_MAX == 0xFFFF
          typedef signed   long Int16;
          typedef unsigned long Uint16;
      #else
          #error No 16 bits integer type for this platform
      #endif

 

      // 32 bits integer types
      #if USHRT_MAX == 0xFFFFFFFF
          typedef signed   short Int32;
          typedef unsigned short Uint32;
      #elif UINT_MAX == 0xFFFFFFFF
          typedef signed   int Int32;
          typedef unsigned int Uint32;
      #elif ULONG_MAX == 0xFFFFFFFF
          typedef signed   long Int32;
          typedef unsigned long Uint32;
      #else
          #error No 32 bits integer type for this platform
      #endif

 

  } // namespace sf

 

 

  #endif // SFML_CONFIG_HPP

   * 10 + ////////////////////////////////////////////////////////////

  //

  // SFML - Simple and Fast Multimedia Library

  // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)

  //

  // This software is provided 'as-is', without any express or implied
  warranty.

  // In no event will the authors be held liable for any damages arising from
  the use of this software.

  //

  // Permission is granted to anyone to use this software for any purpose,

  // including commercial applications, and to alter it and redistribute it
  freely,

  // subject to the following restrictions:

  //

  // 1.  The origin of this software must not be misrepresented;

  // you must not claim that you wrote the original software.

  // If you use this software in a product, an acknowledgment

  // in the product documentation would be appreciated but is not required.

  //

  // 2.  Altered source versions must be plainly marked as such,

  // and must not be misrepresented as being the original software.

  //

  // 3.  This notice may not be removed or altered from any source
  distribution.

  //

  ////////////////////////////////////////////////////////////

 

  #ifndef SFML_CONFIG_HPP

  #define SFML_CONFIG_HPP

 

  ////////////////////////////////////////////////////////////

  // Identify the operating system

  ////////////////////////////////////////////////////////////

  #if defined(_WIN32) || defined(__WIN32__)

 

      // Windows
      #define SFML_SYSTEM_WINDOWS
      #ifndef WIN32_LEAN_AND_MEAN
          #define WIN32_LEAN_AND_MEAN
      #endif
      #ifndef NOMINMAX
          #define NOMINMAX
      #endif

 

  #elif defined(linux) || defined(__linux)

 

      // Linux
      #define SFML_SYSTEM_LINUX

 

  #elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) ||
  defined(Macintosh)

 

      // MacOS
      #define SFML_SYSTEM_MACOS

 

  #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)

 

      // FreeBSD
      #define SFML_SYSTEM_FREEBSD

 

  #else

 

      // Unsupported system
      #error This operating system is not supported by SFML library

 

  #endif

 

 

  ////////////////////////////////////////////////////////////

  // Define a portable debug macro

  ////////////////////////////////////////////////////////////

  #if !defined(NDEBUG)

 

      #define SFML_DEBUG

 

  #endif

 

 

  ////////////////////////////////////////////////////////////

  // Define portable import / export macros

  ////////////////////////////////////////////////////////////

  #if defined(SFML_SYSTEM_WINDOWS)

 

      #ifdef SFML_DYNAMIC

 

          // Windows platforms
          #ifdef SFML_EXPORTS

 

              // From DLL side, we must export
              #define SFML_API __declspec(dllexport)

 

          #else

 

              // From client application side, we must import
              #define SFML_API __declspec(dllimport)

 

          #endif

 

          // For Visual C++ compilers, we also need to turn off this annoying C4251 warning.
          // You can read lots ot different things about it, but the point is the code will
          // just work fine, and so the simplest way to get rid of this warning is to disable it
          #ifdef _MSC_VER

 

              #pragma warning(disable : 4251)

 

          #endif

 

      #else

 

          // No specific directive needed for static build
          #define SFML_API

 

      #endif

 

  #else

 

      // Other platforms don't need to define anything
      #define SFML_API

 

  #endif

 

 

  ////////////////////////////////////////////////////////////

  // Define portable fixed-size types

  ////////////////////////////////////////////////////////////

  #include <climits>

 

  namespace sf

  {

      // 8 bits integer types
      #if UCHAR_MAX == 0xFF
          typedef signed   char Int8;
          typedef unsigned char Uint8;
      #else
          #error No 8 bits integer type for this platform
      #endif

 

      // 16 bits integer types
      #if USHRT_MAX == 0xFFFF
          typedef signed   short Int16;
          typedef unsigned short Uint16;
      #elif UINT_MAX == 0xFFFF
          typedef signed   int Int16;
          typedef unsigned int Uint16;
      #elif ULONG_MAX == 0xFFFF
          typedef signed   long Int16;
          typedef unsigned long Uint16;
      #else
          #error No 16 bits integer type for this platform
      #endif

 

      // 32 bits integer types
      #if USHRT_MAX == 0xFFFFFFFF
          typedef signed   short Int32;
          typedef unsigned short Uint32;
      #elif UINT_MAX == 0xFFFFFFFF
          typedef signed   int Int32;
          typedef unsigned int Uint32;
      #elif ULONG_MAX == 0xFFFFFFFF
          typedef signed   long Int32;
          typedef unsigned long Uint32;
      #else
          #error No 32 bits integer type for this platform
      #endif

 

  } // namespace sf

 

 

  #endif // SFML_CONFIG_HPP

  ": syntax error, unexpected exp_DIVIDE, expecting exp_OPENPARENT or
  exp_NUMBER (1)
Call Stack (most recent call first):
  src/SFML/CMakeLists.txt:22 (find_package)


Found SFML: C:/Program Files (x86)/Microsoft Visual Studio/VC/include
Configuring incomplete, errors occurred!

4
C / Problem configuring csfml2 with cmake
« on: June 10, 2011, 10:43:10 pm »
Thanks for you reply!

Now after further researching, I've discovered that I do have a file named "FindSFML.cmake" in the directory/folder from the snapshot in this (relative)
directory sfml/cmake/Modules/. Now the problem is, how do I inform (if this is the correct cmake file) cmake that the file is located in this directory?

I've attempted to change the SFML_DIR name/variable to both the sfml/ directory and the sfml/Modules/ directory but none of them have worked.
Any tips?

5
C / Problem configuring csfml2 with cmake
« on: June 10, 2011, 06:29:17 pm »
Sorry for reviving a thread, buy may I ask exactly what you mean by this:
Quote
the FindSFML.cmake file should have been copied to your CMake directory.

I am having trouble as well with compiling the C binding of sfml. I am receiving the same error as Richy19:
Code: [Select]
CMake Error at src/SFML/CMakeLists.txt:22 (find_package):
Could not find module FindSFML.cmake or a configuration file for package
SFML.

Adjust CMAKE_MODULE_PATH to find FindSFML.cmake or set SFML_DIR to the
directory containing a CMake configuration file for SFML. The file will
have one of the following names:

SFMLConfig.cmake
sfml-config.cmake

The steps I took to compile CSFML was to first compile SFML2 (latest snapshot) with CMake-Gui using "Visual Studio 9 2008".

After that I had two different outputs, sfml-build in the sfml snapshot folder and %APPDATA%/SFML. These two folders
contained solutions to build the projects for Visual Studio 2008. The one in %APPDATA% compiled successfully whilst the one
in the SFML-Build folder only succeeded with two out of 5 projects.

I can't find the SFMLConfig nor sfml-config in neither of these directories, therefore I am wondering where this cmake file i supposed to be located!

Thanks in beforehand!

6
General / SFML & Qt Error
« on: March 23, 2011, 07:34:05 pm »
Hi!

I am not completely sure this problem is related with SFML AND qt or if it's just random.
I've been programming an application in qt and I was just gonna start the sfml part but whenever I include a
sfml header, no matter what header I chose, I receive this error on line 37 in the file which includes the sfml header:
Quote
1>c:\...\mainwindow.h(37) : error C2143: syntax error : missing '}' before '('

Then you may ask; what's on line 37... Well:
Code: [Select]

// Mainwindow.h
namespace EDIT
{
enum ACTION
{
UNDO,
REDO,
CUT,
COPY,
PASTE,
DELETE // <-- This is line 37
};
}
I have no clue what's causing this problem but any help is greatly appreciated

7
Network / Network Problems
« on: February 11, 2011, 11:54:28 am »
Hi!

Quick question, I need to send data to a server via an UDP connection. I'm using a protocol for counter strike 1.6 to communicate with the server.
For a certain request (retrieving server information) you have to send an info string. This string has to end with x00 but I can't send this x00 since it also terminates the string.

In brief: How to send a data string with an zero at the end? (ex: \xFF\x6A\xGS\x00)

EDIT: I got help on the IRC. For those interested in the solution just add 1 to the string length (Socket.send(string, strlen(string) + 1);

8
Network / Converting Code
« on: January 27, 2011, 10:19:58 pm »
No, I am writing this in c++ code and I want to translate this ruby code to
something resembling in sfml (c++). The difference with this script which
you can't do in SFML is listen to all ports (non-specified).

How am I supposed to do that? Or perhaps a better choice, how to find out
which port to listen to?

9
Network / Converting Code
« on: January 27, 2011, 09:46:17 pm »
Hi!

I am stuck at this piece of code which I am not quite sure on how I should
convert. For a little background; this script is used with Half Life (GoldSrc)
to retrieve the current map, number of players etc. on the server.

This is the code for the script in ruby:
Code: [Select]
# start querying servers and storing results in the "results" array
servers.each do |x|
x.chomp!
 case x.split(':')[2]
 when "hl"
   begin
    timeout(1) do
     begin
      socket = UDPSocket.new
      socket.connect(x.split(':')[0], x.split(':')[1].to_i)
      socket.send("\xff\xff\xff\xffinfostring \n", 0)
      a = socket.sysread(16384).delete("\xff").split("\\")
      results << "HL/CS: \x037 #{a[20]} -\x036 #{a[22]}\x0313
#{a[6]}/#{a[12]}\x033 IP: #{x.split(':')[0]}:#{x.split(':')[1]}"
     rescue Errno::ECONNREFUSED
      results << "HL/CS Server: #{x.split(':')[0]}:#{x.split(':')[1]} is
down at the moment (connection refused)"
     end
    end
   rescue TimeoutError
    results << "HL/CS Server: #{x.split(':')[0]}:#{x.split(':')[1]} is
down
at the moment (timed out)"
end
#End the HL query

If I understand everything correctly you are supposed to send a string of data
containing "...\xffinfostring..." to a specific address and a port. The problem lies
in the method that this script uses for retrieving this information.

I cannot interpret what socket.sysread means but is it equal to SocketUDP.Listen(port)?

10
D / DSFML2 Problems
« on: October 17, 2010, 04:59:51 pm »
Stupid me.... I had not even compiled the SFML Libraries before I tried to compile the CSFML libraries.

In other words; everything is fully functional now!
Thans for your help Trass3r!

11
D / DSFML2 Problems
« on: October 17, 2010, 01:58:08 pm »
This might supposed to be in the C-Section though I'll ask you for help anyway.
When I compile (VS2008) I get these errors:
Quote

2>RenderWindow.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Create(struct HWND__ *,struct sf::ContextSettings const &)" (?Create@Window@sf@@QAEXPAUHWND__@@ABUContextSettings@2@@Z) referenced in function _sfRenderWindow_CreateFromHandle
Quote
2>RenderWindow.obj : error LNK2019: unresolved external symbol "public: struct HWND__ * __thiscall sf::Window::GetSystemHandle(void)const " (?GetSystemHandle@Window@sf@@QBEPAUHWND__@@XZ) referenced in function _sfRenderWindow_GetSystemHandle
Any suggestions?

12
D / DSFML2 Problems
« on: October 16, 2010, 09:11:43 pm »
Thank you for your effort Trass3r!

Finally I've got success- and helpful output messages and pathetically enough
I'd forgotten to place the csfml-xxx.dlls in the same directory as the executable.

Now one remaining question; where can I find those?
I can't seem to find'em at the SVN and I'm not able to compile'em either...

13
D / DSFML2 Problems
« on: October 16, 2010, 07:16:28 pm »
I did as you guided me and the compile works fine though I still don't get any
stacktrace output. Do I have to compile with -gc or -debug?

I haven't got wndbg to work for correctly for me.

EDIT: But aren't the CSFML dlls required to be in the same folder as the program executable then?

14
D / DSFML2 Problems
« on: October 16, 2010, 06:44:34 pm »
I shall quote from the website
Quote
The only point where this does not work is the Access Vioaltion error, as it does not call the stacktrace callback function for some reason.
Any other suggestions?

I'm not sure if you are required to link with any sfml libs or dlls.
During the compile process I do a regular compile excepting using -Ipath for the SFML Files.

15
D / DSFML2 Problems
« on: October 15, 2010, 10:53:19 pm »
Hi everyone!

I'm using the following test code for my script:
Code: [Select]
module main;

import dsfml.graphics.all;
import dsfml.window.all;
import dsfml.system.all;

void main(string[] args)

{

RenderWindow app = new RenderWindow(VideoMode(800, 600, 32), "SFML D-Test");

while(app.isOpened())
{
app.clear(Color(255, 255, 255));
}
}
I've kept the code minimal to avoid errors though I have one.
Whenever I run the application I am met by the error
Quote
object.Error: Access Violation
An exception was thrown while finalizing an instance of class dsfml.graphics.renderwindow.RenderWindow
Any suggestions?

Pages: [1] 2