cannot compile /example/lunkwill-canon-capture.c

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cannot compile /example/lunkwill-canon-capture.c

leonhongkong
Hi. I try to compile "libgphoto2-2.5.11/example/lunkwill-canon-capture.c"

by this command "gcc -o OUTPUTFILE lunkwill-canon-capture.c -lgphoto2"

I got error

undefined reference to symbol 'gp_log_add_func@LIBGPHOTO02_5_0'//USR/LOCAL/LIB/LIBGPHOTO2_PORT.SO.12:error adding symbols: DSO mission from command line collect2: error: Id returned 1 exit status

any idea what is wrong?
best regard.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cannot compile /example/lunkwill-canon-capture.c

Marcus Meissner-4
On Tue, Dec 13, 2016 at 01:46:35PM -0700, leonhongkong wrote:

> Hi. I try to compile "libgphoto2-2.5.11/example/lunkwill-canon-capture.c"
>
> by this command "gcc -o OUTPUTFILE lunkwill-canon-capture.c -lgphoto2"
>
> I got error
>
> undefined reference to symbol
> 'gp_log_add_func@LIBGPHOTO02_5_0'//USR/LOCAL/LIB/LIBGPHOTO2_PORT.SO.12:error
> adding symbols: DSO mission from command line collect2: error: Id returned 1
> exit status

Can you try building with

gcc -o OUTPUTFILE lunkwill-canon-capture.c -lgphoto2 -lgphoto2_port

Ciao, Marcus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Loading...