Board index FlightGear Development New features

Force feedback support

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: Force feedback support

Postby harbinger » Thu Sep 27, 2018 9:34 am

Is this thread still alive? I'm trying to get fg-haptics to work, but I'm struggling. I have what I think is all of the latest code, but I'm getting an error, indicating an error in the makefile. Not being a c developer, I'm not too sure how to proceed. The error is:

MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
gcc -o fg-haptic ./fg-haptic.c -D_POSIX_C_SOURCE -g -O2 -Wall -std=c99 ,)) -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lm ,))
gcc.exe: error: ,)): No such file or directory

Please help! Or better still, let me know where I can download the pre-compiled binary for Windows 64-bit.

Thanks
harbinger
 
Posts: 3
Joined: Thu Sep 27, 2018 9:16 am

Re: Force feedback support

Postby wkitty42 » Thu Sep 27, 2018 11:15 am

harbinger wrote in Thu Sep 27, 2018 9:34 am:MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
gcc -o fg-haptic ./fg-haptic.c -D_POSIX_C_SOURCE -g -O2 -Wall -std=c99 ,)) -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lm ,))
gcc.exe: error: ,)): No such file or directory


ummm... what are these things ,)) and where did they come from?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4898
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Force feedback support

Postby harbinger » Thu Sep 27, 2018 1:28 pm

I have no idea. Well, I have a slight idea: In the makefile, there's this:

CFLAGS = -g -O2 -Wall -std=c99 $(foreach pkg,$(PKGS),$(shell pkg-config --cflags $(pkg)))
DEFS = -D_POSIX_C_SOURCE
LIBS = -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lm $(foreach pkg,$(PKGS),$(shell pkg-config --libs $(pkg)))

It looks like "$(shell pkg-config --cflags $(pkg))" and "$(shell pkg-config --libs $(pkg))" aren't returning anything, resulting in the empty list.

I'm relatively certain it's because I haven't installed the SDL developer libraries the way I should, but I have no idea where to put them or how to register them. I've tried just dumping the .lib and .dll files in the same folder as the fg-haptic source.
harbinger
 
Posts: 3
Joined: Thu Sep 27, 2018 9:16 am

Re: Force feedback support

Postby harbinger » Thu Sep 27, 2018 4:49 pm

So it turns out I was using the wrong Make.exe - I never realised that Delphi installs one as well. I've downloaded the GNUWin Make, and I'm getting further, but it's still complaining that it can't find the libs:

c:\Data\Dev\fg-haptic>"C:\Program Files (x86)\GnuWin32\bin\Make"
process_begin: CreateProcess(NULL, pkg-config --cflags sdl2, ...) failed.
process_begin: CreateProcess(NULL, pkg-config --cflags SDL2_net, ...) failed.
process_begin: CreateProcess(NULL, pkg-config --libs sdl2, ...) failed.
process_begin: CreateProcess(NULL, pkg-config --libs SDL2_net, ...) failed.
gcc -o fg-haptic fg-haptic.c -D_POSIX_C_SOURCE -g -O2 -Wall -std=c99 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lm
fg-haptic.c:3:22: fatal error: SDL2/SDL.h: No such file or directory
#include <SDL2/SDL.h>
^
compilation terminated.
Make: *** [fg-haptic] Error 1

So how do we actually install SDL?
harbinger
 
Posts: 3
Joined: Thu Sep 27, 2018 9:16 am

Re: Force feedback support

Postby wkitty42 » Thu Sep 27, 2018 8:29 pm

i don't have a clue... i'm on linux and use the download_and_compile bash script... hopefully someone with building on winwhatever will be along soon and offer some assistance...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4898
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Previous

Return to New features

Who is online

Users browsing this forum: No registered users and 4 guests