How can I build NS-3 Script using g++ and pkg-config

60 views
Skip to first unread message

Ernest Esene

unread,
May 27, 2018, 9:45:17 AM5/27/18
to ns-3-users
Hi ns-3-users,

Is it possible to  build ns-3 script (C++)  under scratch folder using g++ and pkg-config?

I know it is usually done via ./waf as it is in this Makefile:
# Makefile wrapper for waf

all:
./waf

# free free to change this part to suit your requirements
configure:
#./waf configure --enable-examples --enable-tests

build:
#./waf build
install:
./waf install

clean:
./waf clean

distclean:
./waf distclean

I have ns3 library under /usr/lib


/usr/include/ns3.26/:
ns3

/usr/include/ns3.26/ns3:
a2-a4-rsrq-handover-algorithm.h        lte-phy.h
a3-rsrp-handover-algorithm.h        lte-phy-tag.h
aarfcd-wifi-manager.h        lte-radio-bearer-info.h
aarf-wifi-manager.h        lte-radio-bearer-tag.h
abort.h        lte-rlc-am.h
acoustic-modem-energy-model.h        lte-rlc-am-header.h
acoustic-modem-energy-model-helper.h        lte-rlc.h
address.h        lte-rlc-header.h
address-utils.h        lte-rlc-sap.h
adhoc-aloha-noack-ideal-phy-helper.h        lte-rlc-sdu-status-tag.h

...

also pkg-configs

/usr/lib/pkgconfig/libns3.26-antenna-debug.pc
/usr/lib/pkgconfig/libns3.26-aodv-debug.pc
/usr/lib/pkgconfig/libns3.26-applications-debug.pc
/usr/lib/pkgconfig/libns3.26-bridge-debug.pc
/usr/lib/pkgconfig/libns3.26-brite-debug.pc
/usr/lib/pkgconfig/libns3.26-buildings-debug.pc
/usr/lib/pkgconfig/libns3.26-click-debug.pc
/usr/lib/pkgconfig/libns3.26-config-store-debug.pc
/usr/lib/pkgconfig/libns3.26-core-debug.pc
/usr/lib/pkgconfig/libns3.26-csma-debug.pc
/usr/lib/pkgconfig/libns3.26-csma-layout-debug.pc

...

I have run pkg-config
$ pkg-config --cflags --libs libns3.26-antenna-debug
-pthread -DHAVE_GSL=1 -I/usr/include/ns3.26 -Wl,-Bdynamic -lns3.26-antenna-debug -Wl,-Bdynamic -lns3.26-core-debug -lrt -lgsl -lgslcblas -lm


Thank you.
Reply all
Reply to author
Forward
0 new messages