linux + visual studio 2013 + visualgdb, undefined reference to 'dlopen'

208 Views Asked by At
#include <iostream>
#include <dlfcn.h>
using namespace std;

bool LoadEESQuote()
{
    void* m_handle;
    m_handle = dlopen("libEESQuoteApi.so", RTLD_LAZY);
    return true;
}

int main(int argc, char *argv[])
{
    LoadEESQuote();
    return 0;
}

it is said

need -ldl to compile

, so I set:

project properties-Configuration Properties-NMake-Additional Options: -lrt -ldl

but I still get error. Please help me

1

There are 1 best solutions below

0
On

Thanks to n.m. VisualGDB Project Properties- Makefile settings -Additional linker inputs: -ldl and it is worked out