As the title suggested, the library is present in my system (Arch Linux) installed from AUR under the name of openflow-git. I configured ns3 with the following options and this is the result:
```
$ ./ns3 configure --enable-examples --enable-tests --enable-python-bindings --with-openflow=/usr/lib/libopenflow.a
Warn about uninitialized values.
-- The CXX compiler identification is GNU 15.1.1
-- The C compiler identification is GNU 15.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Using default output directory /home/clover/ns-3.45/build
-- Performing Test GCC_WORKING_PEDANTIC_SEMICOLON
-- Performing Test GCC_WORKING_PEDANTIC_SEMICOLON - Success
-- Proceeding without cmake-format
-- Found Git: /usr/bin/git (found version "2.50.1")
-- find_external_library: SQLite3 was found.
-- Found GTK3_GTK: /usr/lib/libgtk-3.so
-- Found Python3: /usr/bin/python3 (found version "3.13.5") found components: Interpreter Development Development.Module Development.Embed
-- NS3_BINDINGS_INSTALL_DIR was not set. The python bindings won't be installed with ./ns3 install. This setting is meant for packaging and redistribution.
-- Set NS3_BINDINGS_INSTALL_DIR="/home/clover/.local/lib/python3.13/site-packages" to install it to the default location.
-- GSL was found.
-- Found Sphinx: /usr/bin/sphinx-build
-- Performing Test HAVE_UINT128_T
-- Performing Test HAVE_UINT128_T - Failed
-- Performing Test HAVE___UINT128_T
-- Performing Test HAVE___UINT128_T - Success
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for netpacket/packet.h
-- Looking for netpacket/packet.h - found
-- Looking for getenv
-- Looking for getenv - found
-- Processing src/visualizer
-- NS3_BINDINGS_INSTALL_DIR was not set. The visualizer python module won't be installed with ./ns3 install.
-- Processing src/antenna
-- Performing Test HAVE_STD_BESSEL_FUNC
-- Performing Test HAVE_STD_BESSEL_FUNC - Success
-- Standard library Bessel function has been found
-- Processing src/aodv
-- Processing src/applications
-- Processing src/bridge
-- Processing src/brite
-- find_external_library: brite was found.
-- Processing src/buildings
-- Processing src/click
-- find_external_library: click was found.
-- Processing src/config-store
-- Processing src/core
-- Looking for include files boost/units/quantity.hpp, boost/units/systems/si.hpp
-- Looking for include files boost/units/quantity.hpp, boost/units/systems/si.hpp - found
-- Boost Units have been found.
-- Processing src/csma
-- Processing src/csma-layout
-- Processing src/dsdv
-- Processing src/dsr
-- Processing src/energy
-- Processing src/fd-net-device
-- Looking for net/ethernet.h
-- Looking for net/ethernet.h - found
-- Looking for netpacket/packet.h
-- Looking for netpacket/packet.h - found
-- Looking for net/if.h
-- Looking for net/if.h - found
-- Looking for linux/if_tun.h
-- Looking for linux/if_tun.h - found
-- Looking for net/netmap_user.h
-- Looking for net/netmap_user.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.5.1")
-- Checking for module 'libdpdk'
-- Found libdpdk, version 24.11.2
-- Processing src/flow-monitor
-- Processing src/internet
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Processing src/internet-apps
-- Processing src/lr-wpan
-- Processing src/lte
-- Processing src/mesh
-- Processing src/mobility
-- Processing src/netanim
-- Processing src/network
-- Processing src/nix-vector-routing
-- Processing src/olsr
-- Processing src/openflow
-- find_external_library: openflow was found.
-- Looking for C++ include boost/static_assert.hpp
-- Looking for C++ include boost/static_assert.hpp - found
-- Processing src/point-to-point
-- Processing src/point-to-point-layout
-- Processing src/propagation
-- Processing src/sixlowpan
-- Processing src/spectrum
-- Processing src/stats
-- Processing src/tap-bridge
-- Processing src/test
-- Processing src/topology-read
-- Processing src/traffic-control
-- Processing src/uan
-- Processing src/virtual-net-device
-- Processing src/wifi
-- Processing src/wimax
-- Processing src/zigbee
-- ---- Summary of ns-3 settings:
Build profile : default
Build directory : /home/clover/ns-3.45/build
Build with runtime asserts : ON
Build with runtime logging : ON
Build version embedding : OFF (not requested)
BRITE Integration : ON
DES Metrics event collection : OFF (not requested)
DPDK NetDevice : OFF (not requested)
Emulation FdNetDevice : ON
Examples : ON
File descriptor NetDevice : ON
GNU Scientific Library (GSL) : ON
GtkConfigStore : ON
LibXml2 support : ON
MPI Support : OFF (not requested)
ns-3 Click Integration : ON
ns-3 OpenFlow Integration : ON
Netmap emulation FdNetDevice : OFF (missing dependency)
PyViz visualizer : ON
Python Bindings : ON
SQLite support : ON
Eigen3 support : ON
Tap Bridge : ON
Tap FdNetDevice : ON
Tests : ON
Modules configured to be built:
antenna aodv applications
bridge brite buildings
click config-store core
csma csma-layout dsdv
dsr energy fd-net-device
flow-monitor internet internet-apps
lr-wpan lte mesh
mobility netanim network
nix-vector-routing olsr openflow
point-to-point point-to-point-layout propagation
sixlowpan spectrum stats
tap-bridge test topology-read
traffic-control uan virtual-net-device
visualizer wifi wimax
zigbee
Modules that cannot be built:
mpi
-- Configuring done (9.8s)
-- Generating done (1.5s)
-- Build files have been written to: /home/clover/ns-3.45/cmake-cache
Finished executing the following commands:
mkdir cmake-cache
/usr/bin/cmake -S /home/clover/ns-3.45 -DPython3_LIBRARY_DIRS=/usr/lib -DPython3_INCLUDE_DIRS=/usr/include/python3.13 -DPython3_EXECUTABLE=/usr/bin/python3 -B /home/clover/ns-3.45/cmake-cache -DCMAKE_BUILD_TYPE=default -DNS3_ASSERT=ON -DNS3_LOG=ON -DNS3_WARNINGS_AS_ERRORS=OFF -DNS3_NATIVE_OPTIMIZATIONS=OFF -DNS3_EXAMPLES=ON -DNS3_PYTHON_BINDINGS=ON -DNS3_TESTS=ON -DNS3_WITH_OPENFLOW=/usr/lib/libopenflow.a -G Ninja --warn-uninitialized
```
Then, when I build it, the errors of undefined reference pop up:
```
$ ./ns3 build
[0/2] Re-checking globbed directories...
[1291/2040] Linking CXX executable /home/clover/ns-3.45/build/src/openflow/examples/ns3.45-openflow-switch-default
FAILED: /home/clover/ns-3.45/build/src/openflow/examples/ns3.45-openflow-switch-default
: && /usr/bin/c++ -Os -g -DNDEBUG -fuse-ld=lld src/openflow/examples/CMakeFiles/openflow-switch.dir/openflow-switch.cc.o -o /home/clover/ns-3.45/build/src/openflow/examples/ns3.45-openflow-switch-default -L/home/clover/ns-3.45/build/lib -Wl,-rpath,/home/clover/ns-3.45/build/lib -Wl,--no-as-needed /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so /home/clover/ns-3.45/build/lib/
libns3.45-csma-default.so /home/clover/ns-3.45/build/lib/
libns3.45-applications-default.so /home/clover/ns-3.45/build/lib/
libns3.45-visualizer-default.so -Wl,--as-needed /usr/lib/libopenflow.a /home/clover/ns-3.45/build/lib/
libns3.45-internet-default.so /home/clover/ns-3.45/build/lib/
libns3.45-bridge-default.so /home/clover/ns-3.45/build/lib/
libns3.45-traffic-control-default.so /home/clover/ns-3.45/build/lib/
libns3.45-wifi-default.so /home/clover/ns-3.45/build/lib/
libns3.45-energy-default.so /home/clover/ns-3.45/build/lib/
libns3.45-spectrum-default.so /home/clover/ns-3.45/build/lib/
libns3.45-propagation-default.so /home/clover/ns-3.45/build/lib/
libns3.45-mobility-default.so /home/clover/ns-3.45/build/lib/
libns3.45-antenna-default.so /home/clover/ns-3.45/build/lib/
libns3.45-point-to-point-default.so /home/clover/ns-3.45/build/lib/
libns3.45-network-default.so /home/clover/ns-3.45/build/lib/
libns3.45-stats-default.so /home/clover/ns-3.45/build/lib/
libns3.45-core-default.so -Wl,--no-as-needed -Wl,--as-needed /usr/lib/libgsl.so /usr/lib/libgslcblas.so /usr/lib/libsqlite3.so /usr/lib/
libpython3.13.so && :
ld.lld: error: undefined reference: ofpbuf_put_zeros
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: xmalloc
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: flow_extract_match
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: time_now
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_vlan_vid
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_vlan_pcp
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: strip_vlan
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_dl_addr
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_nw_addr
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_tp_port
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_mpls_label
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_mpls_exp
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: pop_mpls_act
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: push_mpls_act
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_mpls_label_act
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: set_mpls_exp_act
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: ofpbuf_try_pull
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: ofpbuf_push_uninit
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: flow_extract
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: undefined reference: vport_table_lookup
>>> referenced by /home/clover/ns-3.45/build/lib/
libns3.45-openflow-default.so (disallowed by --no-allow-shlib-undefined)
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
collect2: error: ld returned 1 exit status
[1301/2040] Building CXX object src/olsr/CMakeFiles/olsr-test.dir/test/tc-regression-test.cc.o
ninja: build stopped: subcommand failed.
Finished executing the following commands:
/usr/bin/cmake --build /home/clover/ns-3.45/cmake-cache -j 11
```
The executable can work by executing examples (`first`) and `hello-simulator`, but I can't add my own examples (copy `first` under the name `myfirst`) to the scratch/ directory which is probably due to the build error.