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

compile fails under MacOSX 10.11.1 "el Capitan" #24

Closed
gicking opened this issue Oct 31, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@gicking
Copy link

commented Oct 31, 2015

hi Valentin,

after updating to MacOSX 10.11.1 "el Capitan" I wanted to check if claiming the USB port now works under OS X (see also #16). Unfortunately make aborts with the below errors. Any ideas? Thanks a lot in advance!

$ make
cc pkg-config --cflags libusb-1.0 -g -O0 --std=gnu99 --pedantic -Ixcrun --show-sdk-path/usr/include/ -Ixcrun --show-sdk-path/usr/include/sys -Ixcrun --show-sdk-path/usr/include/machine -c -o stlink.o stlink.c
stlink.c:247:3: warning: implicit declaration of function 'usleep' is invalid in C99 [-Wimplicit-function-declaration]
usleep(10000);
^
stlink.c:342:4: warning: implicit declaration of function 'fprintf' is invalid in C99 [-Wimplicit-function-declaration]
fprintf(stderr, "Unknown status: %x\n", status);
^
stlink.c:342:4: warning: declaration of built-in function 'fprintf' requires inclusion of the header <stdio.h>
[-Wbuiltin-requires-header]
stlink.c:342:12: error: use of undeclared identifier 'stderr'
fprintf(stderr, "Unknown status: %x\n", status);
^
stlink.c:542:12: error: use of undeclared identifier 'stderr'
fprintf(stderr, "Write error\n");
^
3 warnings and 2 errors generated.
make: *** [stlink.o] Error 1

Best regards,
Georg

@njzhangyifei

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2015

Installing Xcode command line tool by runningxcode-select --install from command line will fix this problem.

Tested on Mac OS X Yosemite 10.10.3. I can confirm this fixes the problem and I can use stm8-flash to program the chip.

@gicking

This comment has been minimized.

Copy link
Author

commented Nov 17, 2015

hi njzhangyifei,

yep, that solved it under MacOS X 10.11.1. Thanks a lot! :-)

Georg

@gicking gicking closed this Nov 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.