Thread

  1. kdevelop -> libpq-fe.h ( part II )

    Eduardo Kotujansky <ekotuja@brasilnet.net> — 2000-08-15T18:20:20Z

     The libpg-fe.h is in   /usr/include/pgsql/libpq-fe.h
     so i  did:
    
     #include "../include/pgsql/libpq-fe.h"
    
     and the message changed:
    
    
    c++  -O0 -g3 -Wall  -o usa_postgresql  main.o  
    main.o: In function `exit_nicely(pg_conn *)':
    /root/usa_postgresql/usa_postgresql/main.cpp:13: undefined reference to `PQfinish'
    main.o: In function `main':
    /root/usa_postgresql/usa_postgresql/main.cpp:47: undefined reference to `PQsetdbLogin'
    /root/usa_postgresql/usa_postgresql/main.cpp:52: undefined reference to `PQstatus'
    /root/usa_postgresql/usa_postgresql/main.cpp:55: undefined reference to `PQerrorMessage'
    /root/usa_postgresql/usa_postgresql/main.cpp:63: undefined reference to `PQexec'
    /root/usa_postgresql/usa_postgresql/main.cpp:64: undefined reference to `PQresultStatus'
    /root/usa_postgresql/usa_postgresql/main.cpp:67: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:75: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:81: undefined reference to `PQexec'
    /root/usa_postgresql/usa_postgresql/main.cpp:82: undefined reference to `PQresultStatus'
    /root/usa_postgresql/usa_postgresql/main.cpp:85: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:88: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:89: undefined reference to `PQexec'
    /root/usa_postgresql/usa_postgresql/main.cpp:90: undefined reference to `PQresultStatus'
    /root/usa_postgresql/usa_postgresql/main.cpp:93: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:98: undefined reference to `PQnfields'
    /root/usa_postgresql/usa_postgresql/main.cpp:100: undefined reference to `PQfname'
    /root/usa_postgresql/usa_postgresql/main.cpp:104: undefined reference to `PQntuples'
    /root/usa_postgresql/usa_postgresql/main.cpp:107: undefined reference to `PQgetvalue'
    /root/usa_postgresql/usa_postgresql/main.cpp:110: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:113: undefined reference to `PQexec'
    /root/usa_postgresql/usa_postgresql/main.cpp:114: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:117: undefined reference to `PQexec'
    /root/usa_postgresql/usa_postgresql/main.cpp:118: undefined reference to `PQclear'
    /root/usa_postgresql/usa_postgresql/main.cpp:121: undefined reference to `PQfinish'
    collect2: ld returned 1 exit status
    gmake: *** [usa_postgresql] Error 1
    *** failed ***
    
    I am still in problem.
    
     Eduardo K.
    
    
  2. Re: kdevelop -> libpq-fe.h ( part II )

    Jesus Aneiros <aneiros@jagua.cfg.sld.cu> — 2000-08-16T01:14:42Z

    What about the libpq and libecpg? Use -lpq -lecpg
    
    --
    Jesus Aneiros Sosa
    mailto:aneiros@jagua.cfg.sld.cu
    http://jagua.cfg.sld.cu/~aneiros
    
    On Tue, 15 Aug 2000, Eduardo wrote:
    
    > 
    >  The libpg-fe.h is in   /usr/include/pgsql/libpq-fe.h
    >  so i  did:
    > 
    >  #include "../include/pgsql/libpq-fe.h"
    > 
    >  and the message changed:
    > 
    > 
    > c++  -O0 -g3 -Wall  -o usa_postgresql  main.o  
    > main.o: In function `exit_nicely(pg_conn *)':
    > /root/usa_postgresql/usa_postgresql/main.cpp:13: undefined reference to `PQfinish'
    > main.o: In function `main':
    > /root/usa_postgresql/usa_postgresql/main.cpp:47: undefined reference to `PQsetdbLogin'
    > /root/usa_postgresql/usa_postgresql/main.cpp:52: undefined reference to `PQstatus'
    > /root/usa_postgresql/usa_postgresql/main.cpp:55: undefined reference to `PQerrorMessage'
    > /root/usa_postgresql/usa_postgresql/main.cpp:63: undefined reference to `PQexec'
    > /root/usa_postgresql/usa_postgresql/main.cpp:64: undefined reference to `PQresultStatus'
    > /root/usa_postgresql/usa_postgresql/main.cpp:67: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:75: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:81: undefined reference to `PQexec'
    > /root/usa_postgresql/usa_postgresql/main.cpp:82: undefined reference to `PQresultStatus'
    > /root/usa_postgresql/usa_postgresql/main.cpp:85: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:88: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:89: undefined reference to `PQexec'
    > /root/usa_postgresql/usa_postgresql/main.cpp:90: undefined reference to `PQresultStatus'
    > /root/usa_postgresql/usa_postgresql/main.cpp:93: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:98: undefined reference to `PQnfields'
    > /root/usa_postgresql/usa_postgresql/main.cpp:100: undefined reference to `PQfname'
    > /root/usa_postgresql/usa_postgresql/main.cpp:104: undefined reference to `PQntuples'
    > /root/usa_postgresql/usa_postgresql/main.cpp:107: undefined reference to `PQgetvalue'
    > /root/usa_postgresql/usa_postgresql/main.cpp:110: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:113: undefined reference to `PQexec'
    > /root/usa_postgresql/usa_postgresql/main.cpp:114: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:117: undefined reference to `PQexec'
    > /root/usa_postgresql/usa_postgresql/main.cpp:118: undefined reference to `PQclear'
    > /root/usa_postgresql/usa_postgresql/main.cpp:121: undefined reference to `PQfinish'
    > collect2: ld returned 1 exit status
    > gmake: *** [usa_postgresql] Error 1
    > *** failed ***
    > 
    > I am still in problem.
    > 
    >  Eduardo K.
    > 
    
    
    
    
  3. Re: kdevelop -> libpq-fe.h ( part II )

    Hugh Lawson <hlawson@triad.rr.com> — 2000-08-16T01:21:13Z

    On Tue, 15 Aug 2000, Eduardo wrote:
    
    > 
    >  The libpg-fe.h is in   /usr/include/pgsql/libpq-fe.h
    >  so i  did:
    > 
    >  #include "../include/pgsql/libpq-fe.h"
    > 
    >  and the message changed:
    > 
    
    
    If you use the gcc C compiler try a command something like this:
    
    gcc -o program program.c -lpq -I/usr/include/pgsql
    
    #  'program'      		is name of executable to produce
    #  'program.c'    		is name of source file being compiled
    #  '-lpq'  	 		means "link against libpq"
    #  '-I/usr/include/pgsql'	directory that contains libpq-fe.h
    
    See 'info gcc'  for full rundown on this compiler.
    
    -- 
    Hugh Lawson
    Greensboro, North Carolina
    hlawson@triad.rr.com