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

Pages: [1]
1
General / Re: SFML Segmentation Fault on Static Build
« on: December 19, 2018, 02:26:14 am »
Still no progress :(

2
General / Re: SFML Segmentation Fault on Static Build
« on: December 14, 2018, 02:40:56 pm »
Use a debugger to get the call stack of the crash.

Is Imgui-SFML also linking SFML statically?

okay, error is
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

i dont have any clue why that causes the error :/

3
General / Re: SFML Segmentation Fault on Static Build
« on: December 14, 2018, 02:27:49 pm »
Use a debugger to get the call stack of the crash.

Is Imgui-SFML also linking SFML statically?

imgui-sfml is only header lib.


4
General / SFML Segmentation Fault on Static Build
« on: December 14, 2018, 01:44:06 pm »
Hi, Im using the SFML 2.5.1, I've already compiled the source to work with my clang/clang++ system version. I am using this Makefile to build my static linked project. When I run the executable, I get segmentation fault (core dumped) error (NOTE: There's no problem with compilation and linking and building)

Here's the Makefile content:
PROJECT_NAME := GeoMath
VERSION := 0.1.3
TYPE := Dynamic
PLATFORM := Linux#Windows
ARCHITECTURE := x86# x86_64
CONFIG := Debug#Release
CXXFLAGS := ${CXXFLAGS} -std=c++11 -Wall -W -pedantic
CXXFLAGS += -D_$(shell echo ${CONFIG} | tr a-z A-Z) -DVERSION=${VERSION}
SRC_DIR := src
INCLUDE_DIR := include

OBJ_DIR := bin
NAME := ${OBJ_DIR}/${PLATFORM}-${TYPE}
BUILD_DIR := build/${PLATFORM}-${TYPE}

LIB_IMGUI := ${INCLUDE_DIR}/imgui
LIB_IMGUI_SFML := ${INCLUDE_DIR}/imgui-sfml

SOURCES := $(wildcard ${SRC_DIR}/*.cpp)
SOURCES += $(wildcard ${LIB_IMGUI}/*.cpp)
SOURCES += $(wildcard ${LIB_IMGUI_SFML}/*.cpp)
SOURCES := $(filter-out ${LIB_IMGUI}/imgui_demo.cpp, ${SOURCES})

OBJECTS := $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SOURCES))
INCLUDES := -I${LIB_IMGUI} -I${LIB_IMGUI_SFML}

ifeq ($(TYPE), Static)
  CXXFLAGS += -DSFML_STATIC
  LDDFLAGS := -Linclude/SFML/lib-clang
  LDDFLAGS += -lsfml-graphics-s -lsfml-window-s -lsfml-system-s
  LDDFLAGS += -lX11 -lXrandr -lpthread -lopenal -ludev -lfreetype -lGL
else
  LDDFLAGS := -lsfml-graphics -lsfml-window -lsfml-system
  LDDFLAGS += -lGL
endif

ifeq ($(PLATFORM), Windows)
  ifeq ($(ARCHITECTURE), x86_64)
    CC = x86_64-w64-mingw32-gcc
    CXX = x86_64-w64-mingw32-g++
  else
    CC = i686-w64-mingw32-gcc
    CXX = i686-w64-mingw32-g++
  endif
  INCLUDES += -Iinclude/SFML/include
  LINKS := -Linclude/SFML/lib
  LDDFLAGS += -lopengl32
  LINKS += ${LDDFLAGS}
else
  CC ?= clang
  CXX ?= clang++
  LINKS := ${LDDFLAGS}
endif

EXECUTABLE := ${PROJECT_NAME}-${CONFIG}-${TYPE}-${ARCHITECTURE}

${EXECUTABLE}: ${OBJECTS}
   ${CXX} ${CXXFLAGS} -o ${OBJ_DIR}/$@ $^ ${INCLUDES} ${LINKS}

$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
   ${CXX} ${CXXFLAGS} -c -o $@ $< ${INCLUDES}

test:
   ./${BUILD_DIR}/${EXECUTABLE}

compile:
   ${CXX} ${CXXFLAGS} -o ${BUILD_DIR}/${EXECUTABLE} ${SOURCES} ${INCLUDES} ${LINKS}

package-windows:
   make CONFIG=Release PLATFORM=Windows
   cd ${BUILD_DIR}/ && zip -9r GeoMath-${PLATFORM}-${TYPE}-${CONFIG}.zip .

5
General / Re: Executable runs on Wine, but NOT on Windows.
« on: December 07, 2018, 05:16:32 pm »
Okay, problem, I am trying to compile and build SFML source using i686-w64-mingw32 on linux. Ive set up the proper compilers. But when configuring with cmake, i get this "wrong make" (the config uses linux make, which i think causes the errors) (Note: there is no equivalent make program on mingw32)

UPDATE:
I am now using this toolchain i got from here.

The error is now:
Found OpenGL: opengl32   
Looking for dinput.h
Looking for dinput.h - found
CMake Error at cmake/Macros.cmake:296 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


UPDATE 2:
It works now! Ive installed mingw-w64-freetype2 and mingw-w64-openal from the AUR. Now, it's compiling, gotta wait to see if it properly builds the dlls. Also, i hope this works now when i run it on actual an Windows

It compiled and builded dlls! It also works with wine still, now im gonna wait for my friend to confirm if it's working on his Windows machine. Thanks community :)

QUESTION:
the wiki says there's a mingw makefile, but it's not present anymore. why?


6
General / Re: Executable runs on Wine, but NOT on Windows.
« on: December 07, 2018, 02:02:41 pm »
Since you're most certainly aren't using the same MinGW/GCC compiler that was used to build the SFML DLLs, have you rebuilt SFML yourself?

Related Reddit post

Oh, so will i compile sfml using mingw or clang?
Clang is what i use for linux build while mingw for crosscompile for windows

7
General / Executable runs on Wine, but NOT on Windows.
« on: December 07, 2018, 05:47:59 am »
Hi, this is my first time using sfml and dear imgui and c++ for a project.

My project runs perfectly on my linux machine, I used mingw-w64-gcc and mingw-w64-g++ to cross-compile my project to a windows executable. I am not using any IDE, I have a makefile. Now, everything works, it compiles, links, and no error whatsoever when im building one for windows. To prove this, I run the .exe using Wine,

1. First of all, I get this `missing libstdc++-6.dll` and `missing libgcc_s_sjlj-1.dll` and such errors. So I've located the following dll and copy pasted it next to my .exe

I have copied the files from `/usr/i686-w64-mingw32/bin/` (because that's the mingw compiler Ive also used. Running again with wine, it works. But when I tested it on an actual Windows (on my friend's pc), I get this `__gxx_personality_v0` error.

2. Second, Ive tried `static linking`, instead of using `-lsfml-graphics` and such for my linker flags, I have used `-lsfml-graphics-s` and such, but I get this `undefined reference` to a bunch of `gl` stuffs. So ive added `-lopengl32 -lwinmm` and stuffs the forum said i should include, I have also passed the `SFML_STATIC` preprocessor macro. Still the same `undefined references` errors.

If you need my Makefile, it's in the attachments below.

please help me.

Pages: [1]