1
Graphics / Re: Extra lines in Text
« on: May 02, 2012, 08:28:26 pm »
Thanks for clearing that up.
Sorry about the TIFF, default screen grab on OS X.
Sorry about the TIFF, default screen grab on OS X.
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.
/Users/nick/src/Thor/src/ActionOperations.cpp:114:89: error: no member named 'bind' in namespace 'std'; did you mean 'find'?
std::remove_copy_if(newEvents.begin(), newEvents.end(), std::back_inserter(out), std::bind(&ActionNode::filterOut, ...
~~~~~^~~~
find
[ 3%] Building CXX object src/CMakeFiles/thor.dir/Action.cpp.o
In file included from /Users/nick/src/Thor/src/Action.cpp:26:
In file included from /Users/nick/src/Thor/include/Thor/Events/Action.hpp:32:
In file included from /Users/nick/src/Thor/include/Thor/Detail/ActionOperations.hpp:32:
In file included from /Users/nick/src/Thor/extlibs/aurora/include/Aurora/SmartPtr/CopiedPtr.hpp:32:
In file included from /Users/nick/src/Thor/extlibs/aurora/include/Aurora/SmartPtr/PtrFunctors.hpp:32:
/Users/nick/src/Thor/extlibs/aurora/include/Aurora/Tools/Metaprogramming.hpp:31:10: fatal error: 'type_traits' file not found
#include <type_traits>
^
1 error generated.
make[2]: *** [src/CMakeFiles/thor.dir/Action.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/thor.dir/all] Error 2
make: *** [all] Error 2
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# set(MACOSX 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++0x -U__STRICT_ANSI__ ")
endif()
[ 46%] Building CXX object src/CMakeFiles/thor.dir/Distributions.cpp.o
0 clang 0x0000000101e8b3e2 _ZL15PrintStackTracePv + 34
1 clang 0x0000000101e8b869 _ZL13SignalHandleri + 553
2 libsystem_c.dylib 0x00007fff8c56ccfa _sigtramp + 26
3 clang 0x00000001010058c6 clang::Decl::getAvailability(std::string*) const + 582
4 clang 0x00000001010349d6 clang::Sema::ActOnBinOp(clang::Scope*, clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) + 1606
5 clang 0x0000000101033bca clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) + 570
6 clang 0x000000010102d06b clang::Parser::ParseAssignmentExpression() + 171
7 clang 0x000000010102cfa1 clang::Parser::ParseExpression() + 17
8 clang 0x00000001010824ae clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 46
9 clang 0x000000010102ca3c clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, bool) + 1564
10 clang 0x000000010102bd59 clang::Parser::ParseCompoundStatementBody(bool) + 409
11 clang 0x000000010102bb4f clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 159
12 clang 0x0000000101577a26 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 454
13 clang 0x0000000101527aac clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 140
14 clang 0x000000010152174e clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int, clang::Decl*) + 2590
15 clang 0x0000000100ff113e clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, bool) + 4478
16 clang 0x0000000100fef2d1 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext) + 3553
17 clang 0x000000010156205c clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 620
18 clang 0x0000000101561064 clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 756
19 clang 0x0000000101560d3f clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 351
20 clang 0x0000000100fedf08 clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 472
21 clang 0x0000000100fed79f clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 1423
22 clang 0x000000010153561d clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::Parser::BalancedDelimiterTracker&) + 205
23 clang 0x0000000101534802 clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) + 3074
24 clang 0x0000000100fee032 clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 770
25 clang 0x0000000100fed79f clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 1423
26 clang 0x0000000100fed199 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 249
27 clang 0x0000000100fd00a5 clang::ParseAST(clang::Sema&, bool) + 325
28 clang 0x0000000100fcebd7 clang::CodeGenAction::ExecuteAction() + 855
29 clang 0x0000000100fa113f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
30 clang 0x0000000100f9fdcb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
31 clang 0x0000000100f925ce cc1_main(char const**, char const**, char const*, void*) + 5086
32 clang 0x0000000100f6cdd8 main + 648
33 clang 0x0000000100f6cb44 start + 52
34 clang 0x0000000000000043 start + 18446744069398410547
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-apple-macosx10.7.3 -emit-obj -disable-free -disable-llvm-verifier -main-file-name Distributions.cpp -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 128.2 -coverage-file CMakeFiles/thor.dir/Distributions.cpp.o -resource-dir /usr/bin/../lib/clang/3.1 -D thor_EXPORTS -D THOR_EXPORTS -D AURORA_HAS_CPP11 -U __STRICT_ANSI__ -D NDEBUG -I /Users/nick/src/Thor/include -I /Users/nick/src/Thor/extlibs/aurora/include -I /usr/local/include -F/Library/Frameworks -fmodule-cache-path /var/folders/89/g_q7hkb564395stb6j4z3dlr0000gn/T/clang-module-cache -stdlib=libc++ -O3 -std=c++0x -fdeprecated-macro -fdebug-compilation-dir /Users/nick/src/Thor/nBuild/src -ferror-limit 19 -fmessage-length 170 -stack-protector 1 -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o CMakeFiles/thor.dir/Distributions.cpp.o -x c++ /Users/nick/src/Thor/src/Distributions.cpp
1. /Users/nick/src/Thor/include/Thor/Math/Distribution.hpp:68:41: current parser token ';'
2. /Users/nick/src/Thor/include/Thor/Math/Distribution.hpp:37:1: parsing namespace 'thor'
3. /Users/nick/src/Thor/include/Thor/Math/Distribution.hpp:48:1: parsing struct/union/class body 'Distribution'
4. /Users/nick/src/Thor/include/Thor/Math/Distribution.hpp:65:3: parsing function body 'Distribution<T>'
5. /Users/nick/src/Thor/include/Thor/Math/Distribution.hpp:65:3: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation)
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/89/g_q7hkb564395stb6j4z3dlr0000gn/T/Distributions-m9S8I2.ii
clang: note: diagnostic msg: /var/folders/89/g_q7hkb564395stb6j4z3dlr0000gn/T/Distributions-m9S8I2.sh
make[2]: *** [src/CMakeFiles/thor.dir/Distributions.cpp.o] Error 254
make[1]: *** [src/CMakeFiles/thor.dir/all] Error 2
make: *** [all] Error 2
The C compiler identification is GNU
The CXX compiler identification is Clang
Checking whether C compiler has -isysroot
Checking whether C compiler has -isysroot - yes
Checking whether C compiler supports OSX deployment target flag
Checking whether C compiler supports OSX deployment target flag - yes
Found SFML: /usr/local/include
Configuring done
Generating done
Nicholass-MacBook-Pro:~ nick$ clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
Nicholass-MacBook-Pro:~ nick$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Nicholass-MacBook-Pro:~ nick$
Nicholass-MacBook-Pro:local nick$ cd /usr/local/
Nicholass-MacBook-Pro:local nick$ ls lib | grep sfml
libsfml-audio-s.a
libsfml-audio.2.0.dylib
libsfml-audio.2.dylib
libsfml-audio.dylib
libsfml-graphics-s.a
libsfml-graphics.2.0.dylib
libsfml-graphics.2.dylib
libsfml-graphics.dylib
libsfml-network-s.a
libsfml-network.2.0.dylib
libsfml-network.2.dylib
libsfml-network.dylib
libsfml-system-s.a
libsfml-system.2.0.dylib
libsfml-system.2.dylib
libsfml-system.dylib
libsfml-window-s.a
libsfml-window.2.0.dylib
libsfml-window.2.dylib
libsfml-window.dylib
Nicholass-MacBook-Pro:local nick$ ls include/ | grep SFML
SFML
Nicholass-MacBook-Pro:local nick$
The file you need (I think at least) is FindSFML.cmake and its located in the SFML source dir under cmake/Modules.
If anyone thinks they can be lazy and just toss in a volatile keyword without proper synchronization to take care of strange multi-threading behavior: You are playing a very dangerous game.
QuoteIf one thread only reads a value while the other writes it, volatile will be required so that the compiler doesn't optimize away the read operations in the first thread -- because it wrongly thinks that the variable never changes.Citing from http://kernel.org/doc/Documentation/volatile-considered-harmful.txt:
QuoteIt doesn't make a variable thread-safe, but it is not completely useless.You are correct. It is not useless. It is in fact far worse, counter-productive.
Moral of the story? Proper usage of synchronization objects almost always takes care of compiler optimization issues without completely suppressing all forms of optimization.
This is completely irrelevant to SFML.
SDL_DisableScreenSaver();
. I was merely looking for an equivalent to this in SFML.