Initial commit

This commit is contained in:
2026-02-23 16:19:27 +01:00
commit f1f11ecf9b
7 changed files with 174 additions and 0 deletions

12
namecollision/build.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -e
OPT="${1:--O0}"
# Compile hello.cpp as a shared library
g++ -std=c++17 "$OPT" -shared -fPIC -o libhello.so hello.cpp
# Compile and link main.cpp with the shared library
g++ -std=c++17 "$OPT" -o main main.cpp -L. -lhello -Wl,-rpath,'$ORIGIN'
echo "Build successful"