I'm having the exact same problem as a person that asked this question: How to hide the exported symbols name within a shared library
I decided to follow instructions given by Alexander (3rd answer) but after including a generated header to my main program in C, i get the error undefined reference to function
head.h
#define SecretFunc1 abab
application.c
#include <stdio.h>
#include "head.h"
int main(){
SecretFunc1();
return 0;
}
libdyn.c
#include <stdio.h>
int SecretFunc1(){
return 2
}
I've built the dynamic library into .so
file, then after trying to build the app with:
gcc app.c -L<path> -ldyn -o sample
In function main undefined reference to abab
I don't really know what to do.