Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpssim.c uses conio.h which isn't available on linux so can't compile #13

Closed
nzkarit opened this issue Jul 25, 2016 · 13 comments
Closed

Comments

@nzkarit
Copy link

nzkarit commented Jul 25, 2016

gpssim.c uses conio.h, which from my googling is Windows only. When you run make on linux you get the following error:

user@ubuntu:~/bladeGPS$ make
gcc -O3 -Wall -I../bladeRF/host/libraries/libbladeRF/include   -c -o gpssim.o gpssim.c
gpssim.c:19:19: fatal error: conio.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'gpssim.o' failed
make: *** [gpssim.o] Error 1
@osqzss
Copy link
Owner

osqzss commented Jul 27, 2016

Sorry for the trouble. I'm not a Linux person, and the code was only tested on the Windows. You can find the source code for the "khbit" and "getch" equivalents for Linux on the net.

@zimler
Copy link

zimler commented Aug 2, 2016

@osqzss osqzss closed this as completed Aug 9, 2016
@osqzss osqzss reopened this Aug 16, 2016
@keith-citrenbaum
Copy link

keith-citrenbaum commented Sep 1, 2016

I've forked this repo and got it compiling and running on Linux with only a few tweaks, mostly just using ncurses for getch (from ncurses-dev) and adding a little khbit function, plus a small change to the Makefile to link to the ncurses lib.

I haven't coded in C for many years now, so there's probably some improvements that can be made to whatever I do.

I'm going to clean it up a bit this weekend and see if osqzss wants to pull it, but if you're interested in playing with it now it's available here:

https://github.com/keith-citrenbaum/bladeGPS

I'm going to also try to get it cycling on OS X as well this weekend.

@Robert-steve
Copy link

@keith-citrenbaum there seems to be an issue with your code while using the interactive mode. No key can be pressed, I can't even exit the program using Ctrl+C.

@keith-citrenbaum
Copy link

Ack! You're right @Robert-steve. I just tested it with the static mode, not interactive. I'll take a look at it this evening.

@Robert-steve
Copy link

I think that it would be better to use getchar() instead of getch(). I will test and give some feedback.

@osqzss osqzss closed this as completed Nov 18, 2016
@TachyonZZ
Copy link

Anyone ever able to compile this in Linux with functional interactive mode? I tried keith-citrenbaum's code however I continued to run into ncurses errors. I also tried to run the windows complied version in wine (with ubuntu) and couldn't get it to initialize the bladeRF. I think wine can work, but I'd rather find a way to run this natively in linux if possible, thank you.

@osqzss osqzss reopened this Feb 19, 2018
@osqzss
Copy link
Owner

osqzss commented Feb 19, 2018

Try to build from the latest source. It's not working quite right but can be some help. I couldn't figure out the way to clear the STDIN buffer after reading a single character with getchar().

@TachyonZZ
Copy link

Indeed this works thank you very much!

@osqzss
Copy link
Owner

osqzss commented Feb 19, 2018

I have added a little more touch. It works much better.

@TachyonZZ
Copy link

I just compiled it on raspbian and got some warnings: tmax.mm, hh, etc "may be used uninitialized in this function" However it appears to run fine. I couldn't get a fix but that could have been because I was lazy and used the 2 year old brdc file in the directory as opposed to grabbing a new one and setting an appropriate time. (I get some live sky leakage where I'm at.)
I have been able to get a fix using raspbian with gps-sdr-sim and bladerf, so it definitely works with the pi. Anyway thanks again.

@osqzss osqzss closed this as completed Feb 19, 2018
@szakacsm
Copy link

gpssim.c uses conio.h, which from my googling is Windows only. When you run make on linux you get the following error:

user@ubuntu:~/bladeGPS$ make
gcc -O3 -Wall -I../bladeRF/host/libraries/libbladeRF/include   -c -o gpssim.o gpssim.c
gpssim.c:19:19: fatal error: conio.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'gpssim.o' failed
make: *** [gpssim.o] Error 1

Hello, I have problem with installation:
cd ../../../bladeGPS: no directiory
which folder should I navigate?

@safayetmuntasirnahin
Copy link

I can't compile a program containing conio.h
I use linux mint ulyana
I wrote the code in visual studio code.
Can any one help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants