greywolf82
greywolf82

Reputation: 22173

Static linking library asan with gcc 4.8

I'm compiling my test executable in this way using gcc 4.8.3:

gcc -o test -g -L/lib64 -fsanitize=address -static-libasan

Result:

/usr/bin/ld: cannot find -lasan
collect2: error: ld returned 1 exit status

Libasan is installed and if I compile without the static option it works. How can I compile the library statically?

Upvotes: 1

Views: 5054

Answers (1)

yugr
yugr

Reputation: 21886

You need to install special package to get static GCC libraries. On Ubuntu you should do

$ sudo apt-get install libgcc-4.8-dev

Upvotes: 2

Related Questions