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

Pages: [1]
1
Feature requests / Re: Move Window BEFORE Appearing
« on: February 12, 2015, 01:51:20 am »
It's been four years. I'm looking at SFML 2.2 and I don't see a way to create a window initially hidden - am I missing the obvious? Surely it got added years ago?

2
General / findSFML not working on travis-ci (linux)
« on: October 13, 2013, 10:51:56 pm »
EDIT: Problem solved, I was building static SFML libraries but trying to link to the dynamic ones.

Hi, I'm using travis-ci to test compilation of my project that uses SFML. I use SFML 2.0, and apt-get on travis cannot get version 2.0, so I'm actually building and installing SFML as part of my travis build. This works, except that findSFML cannot find the installation even when I point it to the exact directory where SFML was installed to.

This is the travis-ci log from my latest attempt:
https://travis-ci.org/LB--/ChessPlusPlus/builds/12495133
You can expand lines with an arrow next to them to see output (for example, expand line 153 to see where SFML gets installed to).

On line 394 it reports that it cannot find SFML, and no matter how much I have messed with it I can't figure out why. The travis-ci build machines are linux, all the information needed should be in that build log.

If needed, here is my .travis.yml file:
https://github.com/LB--/ChessPlusPlus/blob/5f4dfe1c8dda01a81279cdacfa361d681c522a6b/.travis.yml

Does anyone know what I am doing wrong?

3
General / Re: Using with clang on Windows
« on: June 03, 2013, 11:15:57 pm »
Nope, it can't link. I'm having to compile all five dependencies by hand and it's a nightmare. Do you have any suggestions or advice?

4
General / Re: Using with clang on Windows
« on: June 03, 2013, 08:01:17 pm »
The warnings I get all look like this:

In file included from C:\Users\Nicholas\Desktop\GitHub\TaylorPolynomials\lib\SFM
L\src\SFML\System\Win32\ThreadLocalImpl.cpp:28:
In file included from C:\Users\Nicholas\Desktop\GitHub\TaylorPolynomials\lib\SFM
L\src\SFML/System/Win32/ThreadLocalImpl.hpp:31:
C:\Users\Nicholas\Desktop\GitHub\TaylorPolynomials\lib\SFML\include\SFML/System/
NonCopyable.hpp:41:7: warning:
      'dllexport' attribute only applies to variables and functions
      [-Wignored-attributes]
class SFML_SYSTEM_API NonCopyable
      ^
C:\Users\Nicholas\Desktop\GitHub\TaylorPolynomials\lib\SFML\include\SFML/System/
Export.hpp:39:29: note:
      expanded from macro 'SFML_SYSTEM_API'
    #define SFML_SYSTEM_API SFML_API_EXPORT
                            ^
C:\Users\Nicholas\Desktop\GitHub\TaylorPolynomials\lib\SFML\include\SFML/Config.
hpp:88:44: note:
      expanded from macro 'SFML_API_EXPORT'
        #define SFML_API_EXPORT __declspec(dllexport)
                                           ^
<built-in>:155:38: note: expanded from macro '__declspec'
#define __declspec(a) __attribute__((a))
                                     ^
This makes me think that even though the classes are configured to export, it's being ignored because it has to be applied to every member of the class instead.

I changed my command line to this:

cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-std=c++11" -DFREETYPE_LIBRARY=./extlibs/libs/mingw/ -DGLEW_LIBRARY=./extlibs/libs/mingw/ -DJPEG_LIBRARY=./extlibs/libs/mingw/ -DOPENAL_LIBRARY=./extlibs/libs/mingw/ -DSNDFILE_LIBRARY=./extlibs/libs/mingw/ -DBUILD_SHARED_LIBS=0 .

(it now includes -DBUILD_SHARED_LIBS=0) and I no longer get warnings or errors when compiling with mingw32-make :D

Now I just have to check if I can link with my project - hopefully statically linking will work.

5
General / Re: Using with clang on Windows
« on: June 02, 2013, 06:43:17 pm »
Thanks! My build command now looks like this:

cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-std=c++11" -DFREETYPE_LIBRARY=./extlibs/libs/mingw/ -DGLEW_LIBRARY=./extlibs/libs/mingw/ -DJPEG_LIBRARY=./extlibs/libs/mingw/ -DOPENAL_LIBRARY=./extlibs/libs/mingw/ -DSNDFILE_LIBRARY=./extlibs/libs/mingw/ .

I'm using "mingw32-make" to build the makefiles. clang generates a lot of warnings about dllexport/import attributes, and then gives an error:

Linking CXX shared library ..\..\..\lib\sfml-system-2.dll
Cannot export __ZN2sf12microsecondsEx: symbol not found
Cannot export __ZN2sf12millisecondsEi: symbol not found
Cannot export __ZN2sf3errEv: symbol not found
Cannot export __ZN2sf5sleepENS_4TimeE: symbol not found
Cannot export __ZN2sf7secondsEf: symbol not found
Cannot export __ZN2sfdVERNS_4TimeEf: symbol not found
Cannot export __ZN2sfdVERNS_4TimeEx: symbol not found
Cannot export __ZN2sfdvENS_4TimeEf: symbol not found
Cannot export __ZN2sfdvENS_4TimeEx: symbol not found
Cannot export __ZN2sfeqENS_4TimeES0_: symbol not found
Cannot export __ZN2sfeqERKNS_6StringES2_: symbol not found
Cannot export __ZN2sfgeENS_4TimeES0_: symbol not found
Cannot export __ZN2sfgeERKNS_6StringES2_: symbol not found
Cannot export __ZN2sfgtENS_4TimeES0_: symbol not found
Cannot export __ZN2sfgtERKNS_6StringES2_: symbol not found
Cannot export __ZN2sfleENS_4TimeES0_: symbol not found
Cannot export __ZN2sfleERKNS_6StringES2_: symbol not found
Cannot export __ZN2sfltENS_4TimeES0_: symbol not found
Cannot export __ZN2sfltERKNS_6StringES2_: symbol not found
Cannot export __ZN2sfmIERNS_4TimeES0_: symbol not found
Cannot export __ZN2sfmLERNS_4TimeEf: symbol not found
Cannot export __ZN2sfmLERNS_4TimeEx: symbol not found
Cannot export __ZN2sfmiENS_4TimeES0_: symbol not found
Cannot export __ZN2sfmlENS_4TimeEf: symbol not found
Cannot export __ZN2sfmlENS_4TimeEx: symbol not found
Cannot export __ZN2sfmlEfNS_4TimeE: symbol not found
Cannot export __ZN2sfmlExNS_4TimeE: symbol not found
Cannot export __ZN2sfneENS_4TimeES0_: symbol not found
Cannot export __ZN2sfneERKNS_6StringES2_: symbol not found
Cannot export __ZN2sfngENS_4TimeE: symbol not found
Cannot export __ZN2sfpLERNS_4TimeES0_: symbol not found
Cannot export __ZN2sfplENS_4TimeES0_: symbol not found
Cannot export __ZN2sfplERKNS_6StringES2_: symbol not found
collect2.exe: error: ld returned 1 exit status
clang++: error: linker (via gcc) command failed with exit code 1 (use -v to see
invocation)
mingw32-make[2]: *** [lib/sfml-system-2.dll] Error 1
mingw32-make[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2
mingw32-make: *** [all] Error 2

I'm not sure what to do from this point, unfortunately - I'm not very familiar with creating libraries or DLLs with clang.

6
General / Re: Using with clang on Windows
« on: May 31, 2013, 03:14:32 am »
I actually have no idea how to do that. Where would I substitute the gcc libraries to test?

7
General / Using with clang on Windows
« on: May 28, 2013, 10:45:43 pm »
Hi, I've been using clang++ on Windows with many projects for quite some time for its C++11 support, but with SFML I'm getting some issues. I cannot link to any of the precompiled binaries, so I have to make my own. I can generate and build with MinGW Makefiles, and can link to them, but the program crashes when using any SFML call (e.g. ctor for sf::RenderWindow). I'm trying to actually build with clang++ so I can use C++11, not MinGW (I'm using the official version of clang for MinGW on Windows).

I have so far this command line to run cmake to generate makefiles for clang:
cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-std=c++11" .

Unfortunately I get this error:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPack
ageHandleStandardArgs.cmake:97 (message):
  Could NOT find Freetype (missing: FREETYPE_LIBRARY) (found version "2.4.4")
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStan
dardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindFreetype.cmake:10
7 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/Graphics/CMakeLists.txt:102 (find_package)

The only thing I could find was this thread:
http://en.sfml-dev.org/forums/index.php?topic=8787.0
But it doesn't seem to apply to me since I am on Windows.

Does anyone know why it is complaining about not being able to find freetype even though it can if I just just cmake for MinGW? I'm on a Windows 7 64-bit machine but I'm running clang++ and MinGW as 32-bit.

Pages: [1]