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

Pages: [1]
1
Two problems, I'll start with the text not displaying correctly because that is the most obvious issue:



Only certain letters show. This was not always the case, I tweaked some graphics code in another part of the project and this started happening. In fact, I was trying to solve the second problem when the first problem started happening.

Secondly, the program uses massive amounts of ram. To replicate, fly the ship in one direction. The ram usage climbs upward and upward. After 7 hours it uses 700mb of ram.

I managed to comment code until I found the issue. It is located in source/Game/Misc/SpaceBackground.d at line 254.
Code: [Select]
target.draw(star);I'm drawing a circle shape to a RenderTexture. Comment that line of code and memory usage stabilizes at about 60mb consistently. Keep that line of code in and it climbs above 200mb+ over time.


I've attached the source and the executables.

Instructions to run the executables:
(1) Run the server executable.
(2) cd to the Game Executables directory.
(3) Run the Game executable.
(4) Type in letters for the username. Click Enter. Type in letters for the password. Click Enter. Type in letters for a name. Click Enter.
(5) Fly the space ship using the arrow keys. Watch the ram usage. Also notice the missing letters in the text.

Instructions for running from the source:
Use DUB.
Note: The source is using DSFML with the D Language.


I would appreciate ideas for why SFML is failing to render text and uses lots of memory for drawing circle shapes.


Source: http://cl.ly/2H3D3T3A0J2G
Executables: http://cl.ly/2L2v17471u3b

2
I can run the executable on my machine but my friends can't run it on theirs.

How can I package it all together so the libraries are in/with the executable?


(I'm using SFML with the DSFML bindings in D language)

3
I'm running on a Mac and compiled my project using MonoD with D-SFML.

When I have my window completely hidden behind another window, CPU usage goes from 10% to 30%. I noticed it because my laptop's fans started whirring. If the window is slightly visible, CPU is 10%. As soon as I make the window completely not visible, it goes to 30% CPU usage.

It's not a serious problem but it is making my curious. Why does this happen?

4
D / Loving it but a few questions
« on: January 25, 2015, 05:10:20 am »
I'm using D-SFML on a Mac using Xamarin Studio and when I send my executable to another person, they can't run it. They get this error:

Quote
[1/24/15, 8:42:41 PM] Connors: terminal
[1/24/15, 8:42:43 PM] Connors: Last login: Sat Jan 24 19:41:59 on ttys001
/Users/Connor/Downloads/spacecraft ; exit;
Connors-MacBook:~ Connor$ /Users/Connor/Downloads/spacecraft ; exit;
dyld: Library not loaded: @executable_path/../Frameworks/libdsfml-graphics.2.dylib
  Referenced from: /Users/Connor/Downloads/spacecraft
  Reason: image not found
Trace/BPT trap: 5
logout

[Process completed]

How can I include the libraries with the binary?


Thanks,
Gan

5
General / OpenAl bug when compiling SFML
« on: February 23, 2013, 09:10:05 pm »
Code: [Select]
[ 1%] Built target SFML
[ 15%] Built target sfml-system
[ 39%] Built target sfml-window
[ 48%] Built target sfml-network
[ 73%] Built target sfml-graphics
[ 74%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/ALCheck.cpp.o
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.cpp:28:
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.hpp:34:
/Library/Frameworks/OpenAL.framework/Headers/al.h:87:44: error: empty parameter
list defined with a typedef of 'void' not allowed in C++
ALAPI ALenum ALAPIENTRY alGetError( ALvoid );
^
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.cpp:28:
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.hpp:35:
/Library/Frameworks/OpenAL.framework/Headers/alc.h:43:59: error: empty parameter
list defined with a typedef of 'void' not allowed in C++
ALCAPI ALCcontext*ALCAPIENTRY alcGetCurrentContext(ALCvoid);
^
2 errors generated.
make[2]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/ALCheck.cpp.o] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/all] Error 2
make: *** [all] Error 2

I'm trying to install SFML on a friend's computer, I got all the needed stuff installed and set up cmake perfectly. But when I run sudo make install, it runs into this OpenAl error.
Is there any way to fix this?

6
General / Application unexpectantly quit
« on: February 14, 2013, 01:21:04 am »
I made an SFML application with Xcode using frameworks, compiled and sent the binary to a friend. But it won't run for him.
How do I fix this?

7
General / Xcode CMake Post Build Rules Error
« on: February 01, 2013, 03:01:06 am »
Just got the latest snapshot, generated the Xcode files specified towards Frameworks, Examples and Xcode Templates. Opened the Xcode file, hit build and got this error:


Full Text:
Quote
SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/Current" 2.0.0
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf 2.0.0 "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/Current"

SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Resources" Versions/Current/Resources
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf Versions/Current/Resources "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Resources"

SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Headers" Versions/Current/Headers
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf Versions/Current/Headers "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Headers"

SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/SFML" Versions/Current/SFML
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf Versions/Current/SFML "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/SFML"

ProcessInfoPlistFile "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Resources/Info.plist" "/Users/matthew/Desktop/SFML 2.0/CMakeFiles/SFML.dir/Info.plist"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-infoPlistUtility "/Users/matthew/Desktop/SFML 2.0/CMakeFiles/SFML.dir/Info.plist" -expandbuildsettings -platform macosx -o "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Resources/Info.plist"

PhaseScriptExecution "CMake Rules" "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-14CE40DF018649A28B0AA75A.sh"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/sh -c "\"/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-14CE40DF018649A28B0AA75A.sh\""

touch /Users/matthew/Desktop/SFML\ 2.0/dummy.cpp

CpHeader include/SFML/Audio.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Audio.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Audio.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Config.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Config.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Config.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Graphics.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Graphics.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Graphics.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Network.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Network.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Network.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/OpenGL.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/OpenGL.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/OpenGL.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/System.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/System.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/System.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Window.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Window.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Window.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CompileC "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.o" "../SFML 2.0/dummy.cpp" normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions "-DCMAKE_INTDIR=\"Debug\"" -DSFML_EXPORTS -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.8 -g -Wno-sign-conversion "-I/Users/matthew/Desktop/SFML 2.0/Debug/include" -I/Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include "-I/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/DerivedSources/x86_64" "-I/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/DerivedSources" -Wmost -Wno-four-char-constants -Wno-unknown-pragmas "-F/Users/matthew/Desktop/SFML 2.0/Debug" -stdlib=libc++ -fPIC -MMD -MT dependencies -MF "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.d" --serialize-diagnostics "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.dia" -c "/Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/../SFML 2.0/dummy.cpp" -o "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.o"

Ld "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/SFML" normal x86_64
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    setenv MACOSX_DEPLOYMENT_TARGET 10.8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk "-L/Users/matthew/Desktop/SFML 2.0/Debug" "-F/Users/matthew/Desktop/SFML 2.0/Debug" -filelist "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/SFML.LinkFileList" -install_name "@executable_path/../Frameworks/SFML.framework/Versions/2.0.0/SFML" -mmacosx-version-min=10.8 -single_module -o "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/SFML"

PhaseScriptExecution "CMake PostBuild Rules" "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-5CD8DA3C18EF4F7090F20FA9.sh"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/sh -c "\"/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-5CD8DA3C18EF4F7090F20FA9.sh\""

cp -r /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/* SFML.framework/Versions/2.0.0/Headers
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file ... target_directory
make: *** [SFML_buildpart_0] Error 64
Command /bin/sh failed with exit code 2


Any reason for this happening?

8
General / Having a hard time getting SFML to work with Clang
« on: January 11, 2013, 12:20:45 am »
Hey, so far my project was working perfectly, but I needed to use some C++11 features for at attempt at higher resolution thread sleeping.
So I switched my compiler from LLVM GCC 4.2 to Apple LLVM 4.1.

Got these errors:
Quote
Undefined symbols for architecture i386:
  "sf::RenderWindow::RenderWindow(sf::VideoMode, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, sf::ContextSettings const&)", referenced from:
      _main in main.o
  "sf::Packet::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      PacketID::Client::gpLogin(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in PacketID.o
  "sf::Packet::operator>>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)", referenced from:
      PacketID::Server::ppCreatePlayer(ZipPacket*, Map*) in PacketID.o
  "sf::Texture::loadFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sf::Rect<int> const&)", referenced from:
      Map::loadTexture(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in Map.o
  "sf::IpAddress::IpAddress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      TcpClient::runListener() in TCPClient.o
      UdpClient::start() in UDPClient.o
  "sf::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, sf::IpAddress const&)", referenced from:
      TcpClient::runListener() in TCPClient.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Quick google search revealed that I needed to re-compile the framework with the compiler I want to use. Did so with CMake and Xcode, put the new frameworks and stuff in the correct folders(according to the manual mac install doc) and my application still produces the same error.

So I made a new SFML project from the template and it won't compile with either compilers. It produces the errors:
Quote
In file included from /Users/matthew/Desktop/Test Dylib/Test Dylib/main.cpp:1:
In file included from /usr/local/include/SFML/Graphics.hpp:32:
In file included from /usr/local/include/SFML/Window.hpp:32:
In file included from /usr/local/include/SFML/System.hpp:34:
In file included from /usr/local/include/SFML/System/Err.hpp:32:
In file included from /usr/local/include/boost/tr1/tr1/ostream:16:
In file included from /usr/local/include/boost/tr1/detail/config_all.hpp:151:
In file included from /usr/local/include/boost/tr1/tr1/utility:21:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/utility:125:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__tuple:16:
In file included from /usr/local/include/boost/tr1/tr1/type_traits:22:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:214:46: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
template <>          struct ____is_nullptr_t<nullptr_t> : public true_type {};
                                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:343:42: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
                            is_same<_Tp, nullptr_t>::value >
                                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:350:14: error: too few template arguments for class template '__is_function'
    : public __is_function<_Tp> {};
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:344:8: note: template is declared here
struct __is_function
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:419:46: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
template <> struct _LIBCPP_VISIBLE is_scalar<nullptr_t> : public true_type {};
                                             ^
In file included from /Users/matthew/Desktop/Test Dylib/Test Dylib/main.cpp:1:
In file included from /usr/local/include/SFML/Graphics.hpp:32:
In file included from /usr/local/include/SFML/Window.hpp:32:
In file included from /usr/local/include/SFML/System.hpp:34:
In file included from /usr/local/include/SFML/System/Err.hpp:32:
In file included from /usr/local/include/boost/tr1/tr1/ostream:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:130:
In file included from /usr/local/include/boost/tr1/tr1/ios:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:15:
In file included from /usr/local/include/boost/tr1/tr1/string:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:434:
In file included from /usr/local/include/boost/tr1/tr1/algorithm:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:594:
In file included from /usr/local/include/boost/tr1/tr1/memory:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:590:
In file included from /usr/local/include/boost/tr1/tr1/typeinfo:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/typeinfo:61:
In file included from /usr/local/include/boost/tr1/tr1/exception:25:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:128:45: error: field has incomplete type 'std::exception_ptr'
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:123:23: note: definition of 'std::exception_ptr' is not complete until the closing '}'
class _LIBCPP_VISIBLE exception_ptr
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:128:55: error: expected ';' at end of declaration list
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                                      ^
In file included from /Users/matthew/Desktop/Test Dylib/Test Dylib/main.cpp:1:
In file included from /usr/local/include/SFML/Graphics.hpp:32:
In file included from /usr/local/include/SFML/Window.hpp:32:
In file included from /usr/local/include/SFML/System.hpp:34:
In file included from /usr/local/include/SFML/System/Err.hpp:32:
In file included from /usr/local/include/boost/tr1/tr1/ostream:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:130:
In file included from /usr/local/include/boost/tr1/tr1/ios:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:15:
In file included from /usr/local/include/boost/tr1/tr1/string:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:434:
In file included from /usr/local/include/boost/tr1/tr1/algorithm:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:594:
In file included from /usr/local/include/boost/tr1/tr1/memory:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:1558:20: error: no member named 'memcpy' in namespace 'std::__1'; did you mean 'memcpy'?
            _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp));
            ~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/string.h:82:7: note: 'memcpy' declared here
void    *memcpy(void *, const void *, size_t);
         ^
In file included from /Users/matthew/Desktop/Test Dylib/Test Dylib/main.cpp:1:
In file included from /usr/local/include/SFML/Graphics.hpp:32:
In file included from /usr/local/include/SFML/Window.hpp:32:
In file included from /usr/local/include/SFML/System.hpp:34:
In file included from /usr/local/include/SFML/System/Err.hpp:32:
In file included from /usr/local/include/boost/tr1/tr1/ostream:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:130:
In file included from /usr/local/include/boost/tr1/tr1/ios:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:15:
In file included from /usr/local/include/boost/tr1/tr1/string:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:434:
In file included from /usr/local/include/boost/tr1/tr1/algorithm:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:594:
In file included from /usr/local/include/boost/tr1/tr1/memory:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:1586:20: error: no member named 'memcpy' in namespace 'std::__1'; did you mean 'memcpy'?
            _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp));
            ~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/string.h:82:7: note: 'memcpy' declared here
void    *memcpy(void *, const void *, size_t);
         ^
In file included from /Users/matthew/Desktop/Test Dylib/Test Dylib/main.cpp:1:
In file included from /usr/local/include/SFML/Graphics.hpp:32:
In file included from /usr/local/include/SFML/Window.hpp:32:
In file included from /usr/local/include/SFML/System.hpp:34:
In file included from /usr/local/include/SFML/System/Err.hpp:32:
In file included from /usr/local/include/boost/tr1/tr1/ostream:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:130:
In file included from /usr/local/include/boost/tr1/tr1/ios:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:15:
In file included from /usr/local/include/boost/tr1/tr1/string:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:434:
In file included from /usr/local/include/boost/tr1/tr1/algorithm:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:594:
In file included from /usr/local/include/boost/tr1/tr1/memory:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2564:52: error: expected ';' at end of declaration list
    _LIBCPP_INLINE_VISIBILITY unique_ptr(nullptr_t) _NOEXCEPT
                                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2743:52: error: expected ';' at end of declaration list
    _LIBCPP_INLINE_VISIBILITY unique_ptr(nullptr_t) _NOEXCEPT
                                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2993:45: error: C++ requires a type specifier for all declarations
operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t)
                                            ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3001:1: error: 'operator==' cannot be the name of a variable or data member
operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3001:12: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x)
           ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3001:55: error: expected ';' at end of declaration
operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x)
                                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3002:1: error: expected unqualified-id
{
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3760:26: error: expected ';' at end of declaration list
    shared_ptr(nullptr_t) _NOEXCEPT;
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3782:37: error: unknown type name 'nullptr_t'
    template <class _Dp> shared_ptr(nullptr_t __p, _Dp __d);
                                    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3783:51: error: unknown type name 'nullptr_t'
    template <class _Dp, class _Alloc> shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a);
                                                  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:4028:18: error: qualified reference to 'shared_ptr' is a constructor name rather than a type wherever a constructor can be declared
shared_ptr<_Tp>::shared_ptr(nullptr_t) _NOEXCEPT
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

I'm a bit at a loss. I figure I'm doing something quite wrong.

9
I've been using SFML for my project in Xcode and it was beautiful so I decided to port it to windows with Code::Blocks. Few road bumps but it now works fairly flawlessly.
Of course now I have 2 different versions on different OSes in different IDEs. I'd like to keep Xcode on my Mac for the semantic highlighting (which is quite amazing) which Code::Blocks sadly lacks.
Of course I can just copy my changed source files, move them with a flash drive and replace old files but that's a tad tedious.
I'm thinking of setting up a repository to keep source files the same for my stationary PC and for when I'm out in the world programming on my Mac laptop. (Granted Code::Blocks can handle repositories)

How would you handle this situation, or if you have, how did you manage?

10
General / Strangest sf::sleep bug
« on: January 09, 2013, 09:04:25 am »
In my program I couldn't help noticing that the server was lagging behind the client. I have the server hosted on my pc machine and client on my mac.
CPU usage of the PC was 1% so I decided to track the main logic loop's FPS.
I have the sleep method set to 60 frames per second, but using the sf::clock I was able to see that the method was only running at half the speed. 30 frames per second.
I couldn't figure what in my code would cause such a delay. Then I got the idea to clock the sleep method itself. Turns out the sleep method was sleeping for twice as long as it was told to.

So I opened Google Chrome and went searching for an answer. I looked back at my debug console, and suddenly it was spitting out 60 fps instead of the 30. Perplexed, I closed Google Chrome and boom, back down to 30fps.
I re-opened Google Chrome, 60 fps. Closed Google Chrome, 30 fps.

I am unsure about the correlation between Google Chrome and the sf::sleep function... but right now it's an easy fix by just doubling my FPS to 120 so that it runs at 60fps (with Google Chrome closed).

My sleep code:
Code: [Select]
sf::sleep(sf::seconds(1.0f/fps));fps is a const float defined as 60.

If I'm not doing something blatantly wrong, I can provide further information. (Video, full source code, ect)

Edit:
On the plus side this bug has allowed me to make a stabilization formula that generates an FPS ratio dynamically to heighten or lower the sleep amount to produce an equal time step for the physics simulation. Thus keeping the client and server in sync wether the sleep function is malfunctioning or the burden of a heavy load is overtaking.

11
General / Can't get SFML with Code::Blocks working
« on: January 08, 2013, 07:42:48 am »
I've done the tutorial for setting up SFML with Code::Blocks 3 times already and I've ran into many issues. Most I was able to fix by downloading the latest Mingw and setting the compiler to it.

However I can now build static and dynamic builds of the example project perfectly, but when I run it, it just says the application stopped working.
Here's the output:
Quote
Checking for existence: C:\Users\Matthew\Desktop\SFML\Game Client\bin\Debug\Game Client.exe
Executing: "C:\Users\Matthew\Desktop\SFML\Game Client\bin\Debug\Game Client.exe"  (in C:\Users\Matthew\Desktop\SFML\Game Client\.)
Process terminated with status -1073741819 (0 minutes, 2 seconds)
In fact, stepping line-by-line in debugger mode shows it gets to the first line:
Quote
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
Before stopping.

Any ideas?

Pages: [1]