pslib: c++ linking

From: Thomas Ruschival (t.ruschival_at_vivid-md.de)
Date: 11/13/04

  • Next message: William Ballard: "[OT] Gates has spyware on his home machines"
    Date: Sat, 13 Nov 2004 19:45:49 +0100
    To: debian-user@lists.debian.org
    
    

    Hi, as far as I know I can link all C libraries in C++ as
     well. but I can't get it done with pslib. the exactly same
     code compiles and links with C and it doesn't when I
     use C++.
     This is my linking command:
     gcc -o test -L/usr/lib/ -lps -lstdc++ test.cpp
     
     and in /usr/lib is definitely the file
     /usr/lib/libps.so -> libps.so.0.2.4
     
     it all works fine when I compile my file as test.c as C
     code. but with test.cpp I get these errors:
     
     /tmp/ccSuItDe.o(.text+0x11): In function `main':
     : undefined reference to `PS_boot()'
     /tmp/ccSuItDe.o(.text+0x16): In function `main':
     : undefined reference to `PS_new()'
     [bla bla bla and so on......................]
     collect2: ld returned 1 exit status
     
     this is the stupid little piece of code I wrote after the
     bigger project didn't compile:
     
     #include <libps/pslib.h>
     main(int argc, char *argv[]) {
     PSDoc* sheet;
     PS_boot();
     sheet = PS_new();
     PS_open_file(sheet,"test.ps");
     PS_set_info(sheet,"Title","HelloWorld");
     PS_begin_page(sheet,841.9,595.3);
     PS_end_page(sheet);
     PS_shutdown();
     };
     
     what do I do wrong. BTW, I have debian [sid] running.
     
     desperately asking
     Thomas Ruschival

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: William Ballard: "[OT] Gates has spyware on his home machines"