Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c716684

Browse files
committed
Add linker flag -export-dynamic so symbols in libpython*.a are exported.
1 parent 44328e6 commit c716684

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Demo/embed/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ LIBPYTHON= $(blddir)/libpython$(VERSION).a
2222

2323
# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
2424
LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
25+
LDFLAGS= -Xlinker -export-dynamic
2526
SYSLIBS= -lm
2627
MODLIBS=
2728
ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
2829

2930
# Build the demo application
3031
all: demo
3132
demo: demo.o
32-
$(CC) demo.o $(ALLLIBS) -o demo
33+
$(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo
3334

3435
# Administrative targets
3536

0 commit comments

Comments
 (0)