9 lines
275 B
Bash
9 lines
275 B
Bash
#!/bin/bash
|
|
|
|
echo "=== This build SHOULD fail with 'undefined reference' ==="
|
|
echo ""
|
|
g++ -std=c++17 main.cpp -o app 2>&1 || true
|
|
echo ""
|
|
echo "The linker cannot find a definition for add(int, int)."
|
|
echo "Fix: provide the .cpp that defines it, or link the correct library."
|