Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Installing TMX Loader  (Read 3144 times)

0 Members and 1 Guest are viewing this topic.

nicox11

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Installing TMX Loader
« on: March 03, 2016, 11:03:04 am »
Hi  !

I'm trying to install SFML TMX Loader to use it in one of my projects. But, since i'm a beginner, i got some trouble installing it.

So far I tried to follow this : https://github.com/fallahn/sfml-tmxloader/wiki/Building

What i did (i'm on xubuntu) :
- Installed zlib ( sudo apt-get install zlib1g-dev )
- Downloaded sfml-tmxloader
- Theses commands :
mkdir build && cd build (makedir didn't work, so i changed it with mkdir)
cmake .. && make :

Gives me this :

CMake Error at cmake/Modules/FindSFML.cmake:349 (message):
  SFML found but version too low (requested: 2, found: 1.x.x)
Call Stack (most recent call first):
  CMakeLists.txt:80 (find_package)


-- Configuring incomplete, errors occurred!


I'm pretty sure i have SFML 2.

Thank you

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: Installing TMX Loader
« Reply #1 on: March 03, 2016, 11:10:38 am »
mkdir build && cd build (makedir didn't work, so i changed it with mkdir)
cmake .. && make

Oops, that was a typo, thanks for pointing that out. If you got SFML via apt there is a chance it may be out of date. Your best bet to make sure you're up to date is to completely remove any SFML libraries via the package manager then clone/configure/build/install SFML from source.

nicox11

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Installing TMX Loader
« Reply #2 on: March 03, 2016, 01:36:27 pm »
It did the trick, thank you.

I've followed the wiki and now I don't really know how to link it to my project. Here is my current makefile :

program_NAME := arena


program_C_SRCS := $(wildcard *.c)

program_CXX_SRCS := $(wildcard *.cpp)

program_C_OBJS := ${program_C_SRCS:.c=.o}

program_CXX_OBJS := ${program_CXX_SRCS:.cpp=.o}

program_OBJS := $(program_CXX_OBJS) $(program_C_OBJS)

program_INCLUDE_DIRS :=

program_LIBRARY_DIRS :=

program_LIBRARIES :=

CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -std=c++11

LDFLAGS += $(foreach library,$(program_LIBRARY_DIRS),-L$(librarydir))

LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library))

SFML = -lsfml-graphics-d -lsfml-window-d -lsfml-system-d

.PHONY: all clean distclean

all: $(program_NAME)

$(program_NAME): $(program_OBJS)
        $(LINK.cc) $(program_OBJS) -o $(program_NAME) $(SFML)

clean:
        @- $(RM) $(program_NAME)
        @- $(RM) $(program_OBJS)

distclean: clean

 

Thank you

 

anything