how to have a executable in cpp-cheat/shared_library/basic/
Closed this issue · 3 comments
behnamben commented
I tried to change the make file but it doesn't work. I want to have an executable instead of a library file.
cirosantilli commented
I don't understand, why do you expect to get an executable from the shared_library directory, which is basically one of the only directories in this project that generates libraries and not executables?
cd shared_library/basic
make
does produce a few executables for me on Ubuntu 21.10, e.g. maina.out, mainso.out and mainso_fullpath.out.
behnamben commented
Since it was a c training, I was trying to make an executable that uses dlopen inside itself.
cirosantilli commented
OK. Didn't https://github.com/************/cpp-cheat/blob/master/shared_library/basic/dlopen.c work? Just worked for me. Gotta run as:
LD_LIBRARY_PATH=`pwd` ./dlopen.out