I have a huge project that works under Windows (VS 2008). I'm trying to port it to linux but i've encountered a problem in dynamic libraries.
I have a RendererOpenGL project that creates RendererOpenGL.so. But i cannot open that file using the code below: 
#include <dlfcn.h>
#include <cstdio>
int main()
{
	void* libHandle;
	libHandle=dlopen("./RendererOpenGL.so", RTLD_LAZY);
	if(!libHandle)
	{
		printf("PROBLEM OPENING SO FILE!\n");
		return 0;
	}
	printf("Bye...\n");
	return 0;
}
I tried adding -shared to compiler flags or linker options, but nothing changed. And dlopen('RendererOpenGL.so", RTLD_LAZY) doesnt work either. I guess there is something wrong in the configuration.