dlopen/etc doesnt compile. Unresolved symbol

I am exploring the usage of dynamic stuff. So far My program (main.cpp) doesnt want to compile, becouse dlopen&Co are "unresolved". I DID include dlcfn.h.

I need the answer as soon as possible, becouse I have to go home in 30mins(doing rapidly other stuff also).

The correct error message might be "undefined", but this is not my computer.

Upvotes: 0

Views: 215

Answers (2)

dimba
dimba

Reputation: 27631

You have link problem - link with -ldl

Upvotes: 4

doron
doron

Reputation: 28932

when linking you have to link in libdl using something like

gcc -o [my_target] [my_objects] -ldl

Upvotes: 2

Related Questions