Overview
Features
Download
Documentation
Community
Add-Ons & Services

Probleme with linker

A general discussion forum.

Probleme with linker

Postby Plusplus » 03 Jun 2010, 14:02

Hello,
I need to realise an Http client api in order to control a PTZ network camera axis. I tried to compile and executed the sample "httpget" given in the library. It works xery well, but I need to adapt it in my own projet folder. So I tried to copy and compile it in my project folder, with my makefile :

Code: Select all
CPPFLAGS=-Wall -Wextra
CCFLAGS=-pedantic -ansi
LDFLAGS=-lPocoFoundation -lPocoUtil -lPocoXML -lPocoNet
CC=g++
RM=rm
all: ./bin/httpget

./bin/httpget: ./src/httpget.cpp
   -@$(CC) $(CPPFLAGS) $(CCFLAGS) $^ -o $@ $(LDFLAGS)


I haven't any error for compilation but the following error appears when I try to use the program :
Code: Select all
./bin/httpget: error while loading shared libraries: libPocoFoundation.so.9: cannot open shared object file: No such file or directory


I checked if the link file already exist in the folder "/usr/local/lib" :
Code: Select all
root@ubuntu-vaio:/usr/local/lib# ls -l
totale 36048
(...)
lrwxrwxrwx 1 root root       23 2010-06-03 11:41 libPocoFoundationd.so -> libPocoFoundationd.so.9
-rwxr-xr-x 1 root root  8370071 2010-06-03 11:41 libPocoFoundationd.so.9
lrwxrwxrwx 1 root root       22 2010-06-03 11:41 libPocoFoundation.so -> libPocoFoundation.so.9
-rwxr-xr-x 1 root root  1637232 2010-06-03 11:41 libPocoFoundation.so.9
lrwxrwxrwx 1 root root       16 2010-06-03 11:41 libPocoNetd.so -> libPocoNetd.so.9
-rwxr-xr-x 1 root root  5064451 2010-06-03 11:41 libPocoNetd.so.9
lrwxrwxrwx 1 root root       15 2010-06-03 11:41 libPocoNet.so -> libPocoNet.so.9
-rwxr-xr-x 1 root root   927132 2010-06-03 11:41 libPocoNet.so.9
lrwxrwxrwx 1 root root       17 2010-06-03 11:41 libPocoUtild.so -> libPocoUtild.so.9
-rwxr-xr-x 1 root root  2198258 2010-06-03 11:41 libPocoUtild.so.9
lrwxrwxrwx 1 root root       16 2010-06-03 11:41 libPocoUtil.so -> libPocoUtil.so.9
-rwxr-xr-x 1 root root   314532 2010-06-03 11:41 libPocoUtil.so.9
lrwxrwxrwx 1 root root       16 2010-06-03 11:41 libPocoXMLd.so -> libPocoXMLd.so.9
-rwxr-xr-x 1 root root  3223791 2010-06-03 11:41 libPocoXMLd.so.9
lrwxrwxrwx 1 root root       15 2010-06-03 11:41 libPocoXML.so -> libPocoXML.so.9
-rwxr-xr-x 1 root root   556392 2010-06-03 11:41 libPocoXML.so.9


It already exist, so I don't understand... Could you help me ?
Thanks

P.S: sorry for the english, I'm French with a QWERTY keyboard... Not really convinient !
Plusplus
 
Posts: 5
Joined: 03 Jun 2010, 13:49

Re: Probleme with linker

Postby guenter » 03 Jun 2010, 15:39

Make sure /usr/local/lib is in $LD_LIBRARY_PATH or use ldconfig.
guenter
 
Posts: 1092
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Probleme with linker

Postby Plusplus » 03 Jun 2010, 16:55

Indeed. It works very well now ! I thought that /usr/local/lib was already in the local variable by default.

Thank you for this quick answer.
Plusplus
 
Posts: 5
Joined: 03 Jun 2010, 13:49

Re: Probleme with linker

Postby Plusplus » 08 Jun 2010, 16:13

Sorry to bother you but I encountered a new issu with my program.
I need to pilot an IP PTZ axis camera by HTTP request. For example, to focus on the point "200,200" I need to send to it the following HTTP request :

Code: Select all
http://10.x.xx.xx/axis-cgi/com/ptz.cgi?center=200,200


When I use my web navigator (firefox)it works very well and the camera indeed move. But when I try to send the HTTP request with th httpGet program, I just reveive :

Code: Select all
302 found


without any "location" field in the HTTPResponse object, and the camera don't move.

Is it possible that the poco library didn't realy execute http request ? Or is it a problem from the axis camera server wich don't accept request from my program ?
Needless to say the Ip camera and my computer is on a private network.
Plusplus
 
Posts: 5
Joined: 03 Jun 2010, 13:49


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron