Skip to content
Snippets Groups Projects
Commit 50107962 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Duplicate symbol test.

parent d14736e3
No related branches found
No related tags found
No related merge requests found
gcc -shared -o libl1.so lib1.c
gcc -shared -o libl2.so lib2.c
gcc -o main main.c -L. -ll1 -ll2
int testfun(int x)
{
return x+1;
}
int testfun(int x)
{
return x+2;
}
#include <stdio.h>
int testfun(int);
int main(void)
{
printf("%d\n", testfun(42));
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment