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

Pages: [1] 2
1
That did the trick. Really appreciate it, was pulling my hair out trying to fix it. Now I can build my project using CMake.

2
Thanks, linking the way you suggested has got me down to one error. I'm now doing the following:

find_package(SFML 2 COMPONENTS graphics window audio system REQUIRED)

target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_DEPENDENCIES})

The error I'm getting is still to do with libglew,

C:\SFML-2.1\lib\libglew32.a(glew.c.o):glew.c:(.text+0x15262): undefined reference to `wglGetCurrentDC@0'
C:\SFML-2.1\lib\libglew32.a(glew.c.o):glew.c:(.text+0x152f0): undefined reference to `wglGetCurrentDC@0'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\SFML-2.1\lib\libglew32.a(glew.c.o): bad reloc address 0xf554 in section `.rdata'

If I don't rename the x86 build to libglew32.a I get the error, libglew32.a not found.

3
Thanks, good to know. So what I've found is that if I rename libglew.a to libglew32.a the error goes away but I start to get a bunch of these errors:

C:\SFML-2.1\lib\libsfml-window-s-d.a(Window.cpp.obj): In function `ZN2sf6WindowC2Ev':
C:/Users/Tom/Downloads/SFML-master/SFML-master/src/SFML/Window/Window.cpp:48: undefined reference to `sf::Clock::Clock()'

I have similar errors for, libsfml-window-s-d and libsfml-graphics-s-d. There's a bunch of undefined references for
__glewXXXXXX  

I'm going to try compiling my own extlibs rather than using 'C:\Users\Tom\Downloads\SFML-master\SFML-master\extlibs\libs-mingw' as my mingw version may be different. Also, is it a bug that libglew32.a is inside x64 and libglew.a is inside x86?

As you say, I am using the most recent snapshot from the repo. Here's the entire log: http://pastebin.com/CgthCdQB Thanks for the help.

4
Hmm... I thought that's why it says in the FindSFML file,

# Since you have to link yourself all the SFML dependencies when you link it statically, the following
# additional variables are defined: SFML_XXX_DEPENDENCIES and SFML_DEPENDENCIES (see their detailed
# description below).

# - SFML_DEPENDENCIES: the list of libraries SFML depends on, in case of static linking

Which is why I'm setting:
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_DEPENDENCIES})

So this is redundant now? Sorry if I misunderstood you. I'm a CMake noob, I think I'm using the SFML_DEPENDENCIES variable incorrectly.

5
Thanks, I've already read through that. I'm also following the FindSFML.cmake instructions for linking statically, which I assume should address the dependency issue?

set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED)

if(SFML_FOUND)
    include_directories(${SFML_INCLUDE_DIR})
    target_link_libraries(${EXECUTABLE_NAME} ${SFML_DEPENDENCIES})
    target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
endif()

I'm using the main.cpp basic example and have SFML_STATIC defined. I'm using an EAP of Jetbrain's C++ IDE so there is a chance something there is causing issue. But I doubt it since it's just running CMake in the background.

6
Thanks for the reply.

Adding extlibs didn't seem to do much. Renaming lib/libglew.a to libglew32.a got rid of that error but presented me with these new ones:

C:\SFML-2.1\lib\libsfml-window-s-d.a(JoystickImpl.cpp.obj): In function `ZN2sf4priv12JoystickImpl10initializeEv':
C:/Users/Tom/Downloads/SFML-master/SFML-master/src/SFML/Window/Win32/JoystickImpl.cpp:71: undefined reference to `joyGetPosEx@8'
C:\SFML-2.1\lib\libglew32.a(glew.c.o):glew.c:(.text+0x152f0): undefined reference to `wglGetCurrentDC@0'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\SFML-2.1\lib\libglew32.a(glew.c.o): bad reloc address 0xf554 in section `.rdata'

I built the static libraries with the latest version from the repository, could this be the issue? I'm confused here because I'm trying to build just 32-bit, yet the glew lib inside extlib x64 is appended with 32. Surely that should be in the extlib x86? I wonder why it is therefore trying to use libglew32 (which is 64bit according to the above).

7
Hi,

I'm trying to create a CMakeLists.txt file from scratch for my project. I've compiled the most recent SFML2 source as static libraries. However when building the file I get the following:
mingw32-make.exe[3]: *** No rule to make target 'C:/SFML-2.1/lib/libglew32.a', needed by 'Corruption.exe'.  Stop.

My CMakeLists.txt can be seen here: http://pastebin.com/CguyS83F
I've copied the most recent FindSFML.cmake file into my CMake Modules folder, and have followed the linking statically guide. I'm linking the SFML_DEPENDENCIES too.

Any idea as to why I'm getting this? Thanks for the help.

8
SFML projects / Re: Sea sandbox, a procedural sandbox based sailing game
« on: December 03, 2013, 10:41:02 pm »
Looks interesting. Any more screenshots?

Sure. Work has been pretty demanding over the last week or two, so I haven't been as active as I'd like.

Here's a screenshot showing off the new water shader, crew path finding and a GUI helm:


Planning on posting a proper update soonish.  :)

9
SFML projects / Re: Sea sandbox, a procedural sandbox based sailing game
« on: October 25, 2013, 01:24:33 am »
Update 2: A long time coming...
Finally had the time to make some progress and do some well overdue reading. I've re-factored parts of the engine, using some great concepts discussed in 'SFML Game Development' and general code design improvements thanks to 'Effective C++'. Replacing my half-baked scene graph with a fully integrated one. The old world generation has been altered with use of a much more efficient shader that looks far better I feel.

The ocean is now one giant vertex array of quads.

Main menu, complete with tooltips:
http://i.imgur.com/bbgymeV.png

Other things added:

GUI builder example:
GUIBuilder frame(this); //Setup GUI builder with a State reference.
       
sf::Text generateText(mContext.strings.get("GenerateBtn"), mContext.fonts.get("Default"), 32);
       
sf::Vector2f pos((mContext.windowValues.at(WindowProperties::Width)/2)-generateText.getGlobalBounds().width/2,
                                                        mContext.windowValues.at(WindowProperties::Height)/1.5);

//Create a Button that sends message containing an intent to change to the main game state.    
frame.Button(generateText, mContext.strings.get("GenerateBtnTip"), pos,
                                        Message::Ptr(new Message(-1, Message::Type::ChangeState, new Attribute<State::Intent>(Attr::StateIntent, State::Intent(State::ID::Game, true)))));

//Frame returns a constructed entity which is then attached to the GUI layer.
mRootNode.getNode(mGuiID)->attachChild(frame.build());

More to come shortly. Hopefully gameplay.
Thanks for reading.

10
General discussions / Re: SFML Game Development -- A book on SFML
« on: September 01, 2013, 07:21:26 pm »
Just bought the book and I'm about half way through. It flows extremely well and has been a great read so far. It's filled many gaps in my game dev knowledge and refined what I thought I already knew. Exactly the kind of book I've been looking for.

Thank you to all the authors!  :)

11
General discussions / Re: A new logo for SFML
« on: April 09, 2013, 05:09:56 pm »
So I had a shot with 'power on' idea, but with simple colours with the free font: http://www.fontsquirrel.com/fonts/titan-one




I think it has sort of a 'HTML 5 Logo' feel, thoughts?

12
Sadly not yet... I kind of decided to re-write the entire engine. Basically, I was stretching the limit of my pure inheritance based entity design. I was fighting against the engine even in the early stages...

The new engine should serve as a flexible base for all my 2D game endeavors (I hope!).

Features include:
Stack based game states.
Entity-Component design, with self-attaching components.
'Blackboard pattern' for intra-component communication.
Messaging system for inter-component communication.
Less use of singletons. (I had a singleton for every single manager class... it was a nightmare to debug.) Now I only have one - the Logger service.
Everything else I should be able to re-factor into the new design. (Which isn't much) :]

13
General discussions / Re: A new logo for SFML
« on: March 31, 2013, 09:10:23 pm »
Quote
I really like that one. It's simple, even has a meaning (I'm sure that no one will find it out, but you have something to tell if you get asked ;)), easily recognizable etc.

I agree that so far this one could be the most recognizable, I like the simplicity.

Here's an album of other library/open source project logos, which could perhaps serve as some inspiration. http://imgur.com/a/oz4tV

14
General discussions / Re: A new logo for SFML
« on: March 31, 2013, 08:43:30 am »
The arrow is a neat idea, I like the idea of one 'simple' element to go along with the text in the logo.

Here is another more simple logo I made using the same font as before:

15
General discussions / Re: A new logo for SFML
« on: March 27, 2013, 02:30:10 am »
So decided to have a crack at this. Made in Paint.net using the 'libre' font Orbitron (SIL Open Font) http://www.fontsquirrel.com/fonts/Orbitron

I tried to keep with the original design but make it more minimal and clean.

Version 1:


Version 2:


Version 3:


Version 3 Wide:


Version 3 Wide 2:

Pages: [1] 2
anything