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

not compiled in ubuntu 18.04 #100

Open
GavukaAlexandr opened this issue May 13, 2018 · 6 comments
Open

not compiled in ubuntu 18.04 #100

GavukaAlexandr opened this issue May 13, 2018 · 6 comments

Comments

@GavukaAlexandr
Copy link

sudo apt-get install pkg-config
sudo apt-get install libusb-1.0-0-dev
You need to change the path to the libusb in the stm8flash/pgm.h file on #include </usr/include/libusb-1.0/libusb.h>

@spth
Copy link
Collaborator

spth commented Jun 26, 2018

I guess we'd need a configure script or a full autotools setup to handle varying libusb locations portably.

Philipp

@mrx23dot
Copy link

Same problem on debian too, it's located at /usr/include/libusb-1.0/libusb.h

@stefaandesmet2003
Copy link
Contributor

same file location on ubuntu 20.04, but stm8flash compiles OK.

@agentgoblin
Copy link

Debian 11 and Ubuntu 20.04 reporting. Package libusb-1.0-0-dev places the libusb.h in /usr/include/libusb-1.0/libusb.h in both distros. stm8flash compiled successfully after installing pkg-config.

$ make
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stlink.o stlink.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stlinkv2.o stlinkv2.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o espstlink.o espstlink.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o main.o main.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o byte_utils.o byte_utils.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o ihex.o ihex.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o srec.o srec.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stm8.o stm8.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o libespstlink.o libespstlink.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`  stlink.o stlinkv2.o espstlink.o main.o byte_utils.o ihex.o srec.o stm8.o libespstlink.o `pkg-config --libs libusb-1.0` -o stm8flash
$ ./stm8flash -V
20170616-1.1

@agentgoblin
Copy link

I guess we'd need a configure script or a full autotools setup to handle varying libusb locations portably.

pkg-config does it.

@spth
Copy link
Collaborator

spth commented Nov 17, 2021

For me (Debian GNJ/Linux testing) it always worked fine via the pkg-config in the Makefile.

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

5 participants