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

Pages: [1]
1
General / Re: SFML and cmake
« on: September 14, 2013, 11:01:45 pm »
Sorry for not specifying, this is on Windows 7 using Nuwen's MinGW distro ( nuwen.net/mingw.html ).

Here are thelink errors
Linking CXX executable chesspp.exe
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x13d): undefin
ed reference to `sf::Clock::Clock()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x144): undefin
ed reference to `sf::Time::Zero'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x471): undefin
ed reference to `sf::err()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x55b): undefin
ed reference to `sf::Time::Zero'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x589): undefin
ed reference to `sf::seconds(float)'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x5f1): undefin
ed reference to `sf::err()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x6f4): undefin
ed reference to `sf::Clock::restart()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x754): undefin
ed reference to `sf::Clock::Clock()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x75b): undefin
ed reference to `sf::Time::Zero'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x7ce): undefin
ed reference to `sf::err()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x8e1): undefin
ed reference to `sf::err()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x9c4): undefin
ed reference to `sf::Clock::Clock()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0x9d6): undefin
ed reference to `sf::Time::Zero'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xab2): undefin
ed reference to `sf::Time::Zero'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xab7): undefin
ed reference to `sf::operator!=(sf::Time, sf::Time)'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xac7): undefin
ed reference to `sf::Clock::getElapsedTime() const'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xad3): undefin
ed reference to `sf::operator-(sf::Time, sf::Time)'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xadb): undefin
ed reference to `sf::sleep(sf::Time)'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xae3): undefin
ed reference to `sf::Clock::restart()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xaf1): undefin
ed reference to `sf::err()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xc34): undefin
ed reference to `sf::Clock::restart()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xd60): undefin
ed reference to `sf::err()'
C:/Program Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj):Window.cpp:(.text+0xe71): undefin
ed reference to `sf::err()'
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Progr
am Files (x86)/SFML/lib/libsfml-window-s.a(Window.cpp.obj): bad reloc address 0x24 in section `.xdat
a'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [chesspp.exe] Error 1
make[1]: *** [CMakeFiles/chesspp.dir/all] Error 2
make: *** [all] Error 2

C:\Users\Sean\Documents\ChessPlusPlus\build>

2
General / SFML and cmake
« on: September 14, 2013, 07:38:31 pm »
Hello, I am re-writing a CMakeLists.txt file for a project to use FindSFML.cmake and am having problems. The project builds fine but fails linking when static build is selected. I know it isn't a problem with the libs, I've linked to them without issue with the old CMakeLists.txt.

I would really appreciate if someone could point out what I am doing wrong or give me some suggestions. Here is my current attempt.
# ChessPlusPlus
#
# Configuration options:
# -DCMAKE_BUILD_TYPE=Release|Debug
# -DSTATIC_BUILD=1|0

cmake_minimum_required (VERSION 2.8)

project (CHESSPP)

if(WIN32)
    set(SFML_ROOT "" CACHE PATH "Path to SFML root directory")
    option(STATIC_BUILD OFF "Link statically")    
endif()

if(NOT JSONLIB)
    set(JSONLIB ${CHESSPP_SOURCE_DIR}/lib/json-parser)
endif()
if(NOT BOOSTLIB)
    set(BOOSTLIB ${CHESSPP_SOURCE_DIR}/lib/boost)
endif()

include_directories (${JSONLIB})
include_directories (${BOOSTLIB})

file(GLOB_RECURSE CHESSPP_SOURCES "src/*.cpp")
file(GLOB_RECURSE CHESSPP_HEADERS "src/*.hpp")
list(APPEND CHESSPP_SOURCES "lib/json-parser/json.c")

set (CHESSPP_INCLUDE_DIRS "")
foreach (_headerFile ${CHESSPP_HEADERS})
    get_filename_component(_dir ${_headerFile} PATH)
    list (APPEND CHESSPP_INCLUDE_DIRS ${_dir})
endforeach()
list(REMOVE_DUPLICATES CHESSPP_INCLUDE_DIRS)
include_directories(${CHESSPP_INCLUDE_DIRS})

list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
 
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
if(STATIC_BUILD)
        set(SFML_STATIC_LIBRARIES TRUE)
endif()
find_package(SFML 2 REQUIRED system window graphics network audio)
include_directories (${SFML_INCLUDE_DIR})
link_directories(${SFML_ROOT}/lib)
add_executable (chesspp ${CHESSPP_SOURCES})
target_link_libraries(chesspp ${SFML_LIBRARIES} boost_system boost_filesystem)
 

3
General discussions / SFML Project Wizard for Visual Studio 2010
« on: May 30, 2012, 06:27:38 pm »
I made a custom wizard for VS2010 which creates a console project with the correct compile and linker settings for an SFML project. The wizard then adds a simple source file and image to test the install, create the project and press F5. It also copies the required  dll's into the output directory so manually copying the sfml or libsnd/openal dlls is unnecessary.

Project wizard requires the path to SFML root directory and gives choice of dynamic or static linkage. The project is located at http://code.google.com/p/sfml-project-wizard/ there is an msi installer under downloads.

I used the Ogre project wizard ( http://bitbucket.org/jacmoe/ogreappwizards ) as a guide to make this, primarily the JScript which I was completely unfamiliar with. I'm also not good with html so the wizard UI needs work. I do plan to add functionality to the wizard (choice of empty project, windows project, etc...) recommendations and any feedback in general is appreciated.

This was my first attempt at a custom wizard and making an installer package so they are far from perfect. I tested the install on a non-development system, and the entire process was pretty easy. Install VC++ express, download and extract SFML2 VS2010 package, install the wizard, create project and compile. I'm just hoping it goes that smoothly on other users systems.

Any/all feedback is greatly appreciated.

Pages: [1]