← index #7910Issue #5679
Off-topic · high · value 0.282
QUERY · ISSUE

ports/unix: how to add a c++ shared library to the makefile .i want set a module,which can use c++ function.

openby Mohewkkopened 2021-10-19updated 2024-10-01
port-unix

(no description)

CANDIDATE · ISSUE

ports/unix/mpconfigport.mk does not allow configuration/inclusion of FRAMEBUF

closedby ikelosopened 2020-02-20updated 2020-02-21
port-unix

I was recently trying to test some micropython on my laptop that's targeted against an ESP8266. I used the framebuf module, but found it wasn't included in my default installation of micropython. I found that it was enabled in the "coverage" build, but I didn't want it significantly different from the standard build, I just wanted the framebuf module to be present. So I looked for configuration options and found mpconfigport.mk and decided to add MICROPY_PY_FRAMEBUF = 1 to it, but that didn't seem to change anything. Compiling it with V=1 showed that the Makefile wasn't passing it as a compilation flag, so whilst make knew it was defined, the C code did not.

It seems like have all configuration options being configurable in the same place (where a distribution can just add a line to the .mk file, rather than writing a define into the middle of a .h file) would make sense? As best I can tell, the Makefile needs to look for the variable, and if present add -DMICROPY_PY_FRAMEBUF=1. It doesn't feel like a big fix, but please let me know if you need more information or don't have time to handle it and I can try and mock up a pull request...

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied