Whenever you want to use POSIX functions like dlopen and dlsyn, should you put -ldl at the very end of the linking command, like:
g++ -rdynamic -Wl,-rpath,. -L. -o Progr ./Progr.o -ldl
but not like:
g++ -rdynamic -ldl -Wl,-rpath,. -L. -o Progr ./Progr.o
Yet don't know why, accept as a fact.
g++ -rdynamic -Wl,-rpath,. -L. -o Progr ./Progr.o -ldl
but not like:
g++ -rdynamic -ldl -Wl,-rpath,. -L. -o Progr ./Progr.o
Yet don't know why, accept as a fact.
No comments:
Post a Comment