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

better example.

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