[LC++]Linkinkg with my own library

Laszlo Boszormenyi boszorme at mazsola.iit.uni-miskolc.hu
Wed Aug 1 22:04:29 UTC 2001


Hi.

I have a small library as follows:
class Webhelper {
public:
	Webhelper(void) {
		[...]
	}
	~Webhelper(void) {
		[...]
	}
	vector<string> parseQuery(void) {
		[...]
	}
};
compiled with g++ 2.95.4, switches: -Wall -shared -fPIC -o libWebhelper.so Webhelper.cpp
I think this where I make my mistake. As I can not compile the lines:
Webhelper parser;
parser.parseQuery();
because all the symbols related to the lib can not be found. I have tried
a lot of things, set LD_LIBRARY_PATH, put my lib into /usr/lib and
ldconfig etc. Still, during linking I get unresolved symbols. At last I
have tried ld --library Webhelper and this said:
ld: warning: cannot find entry symbol _start; not setting start address
Thus ld sees my lib, but can not handle it or something. Please give me
some idea what is wrong. Thanks!

Second: how can I get the position of a character I search
for in a string? strstr and others give me a pointer to that char, but not
the position.

Thanks,
Laszlo




More information about the tuxCPProgramming mailing list