Confira no C:\Arquivos de programas\PostgreSQL\8.3\lib se existe o arquivo "
libpq.a".
Fiz um teste aqui: renomeei o meu "libpq.a" e deu o mesmo erro que você
teve.

2008/2/11, Fernando de Oliveira <[EMAIL PROTECTED]>:
>
>  Erro retornado retirando "-lcurl"
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
> C:\Dev-Cpp\Projetos\testes>C:\Dev-Cpp\bin\gcc -Wall 
> main.cpp-I"C:\Dev-Cpp\inclu
> de" -I"C:\Arquivos de programas\PostgreSQL\8.3\include" -L"C:\Dev-Cpp\lib"
> -L"C:
> \Arquivos de programas\PostgreSQL\8.3\lib"  -lpq -o teste.exe
> C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
> cannot f
> ind -lpq
> collect2: ld returned 1 exit status
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> muito agradecido pela ajuda.
>
> []s
> Fernando de Oliveira
>
> ----- Original Message -----
> *From:* Alexsander Rosa <[EMAIL PROTECTED]>
> *To:* Comunidade PostgreSQL Brasileira<[email protected]>
> *Sent:* Monday, February 11, 2008 3:02 PM
> *Subject:* Re: [pgbr-geral] conectar via libpq em c++ windows ( dev-cpp )
>
> Você precisa tirar a LIBCURL (que eu estou usando e você não).
> Remova o "-lcurl" da linha do gcc.
>
> Em 11/02/08, Fernando de Oliveira <[EMAIL PROTECTED]> escreveu:
> >
> >  Eis meu compila.bat adaptado pelo bat do Alexsander:
> >
> > ------------------------ inicio ------------------------
> > @ECHO OFF
> > SET PGINC="C:\Arquivos de programas\PostgreSQL\8.3\include"
> > SET PGLIB="C:\Arquivos de programas\PostgreSQL\8.3\lib"
> >
> > SET CINC="C:\Dev-Cpp\include"
> > SET CLIB="C:\Dev-Cpp\lib"
> > SET GCCDIR=C:\Dev-Cpp\bin\
> >
> >
> > @ECHO ON
> > %GCCDIR%gcc -Wall main.cpp -I%CINC% -I%PGINC% -L%CLIB% -L%PGLIB%  -lcurl
> > -lpq -o teste.exe
> > ------------------------fim ------------------------
> >
> > Erro retornado:
> >
> >
> > ----------------------------------------------------------------------------------------------------------------------------------------------------------
> > C:\Dev-Cpp\Projetos\testes>C:\Dev-Cpp\bin\gcc -Wall 
> > main.cpp-I"C:\Dev-Cpp\inclu
> > de" -I"C:\Arquivos de programas\PostgreSQL\8.3\include"
> > -L"C:\Dev-Cpp\lib" -L"C:
> > \Arquivos de programas\PostgreSQL\8.3\lib"  -lcurl -lpq -o teste.exe
> >
> > C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
> > cannot f
> > ind -lcurl
> > collect2: ld returned 1 exit status
> >
> > ---------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > []s
> > Fernando de Oliveira
> >
> >  ----- Original Message -----
> > *From:* Alexsander Rosa <[EMAIL PROTECTED]>
> > *To:* Comunidade PostgreSQL Brasileira<[email protected]>
> > *Sent:* Monday, February 11, 2008 1:44 PM
> > *Subject:* Re: [pgbr-geral] conectar via libpq em c++ windows ( dev-cpp
> > )
> >
> > Eis meu "compila_win.bat":
> >
> > =========================================== início
> > @ECHO OFF
> > SET PGINC="C:\Arquivos de programas\PostgreSQL\8.2\include"
> > SET PGLIB="C:\Arquivos de programas\PostgreSQL\8.2\lib"
> >
> > SET CINC="C:\Dev-Cpp\include"
> > SET CLIB="C:\Dev-Cpp\lib"
> >
> > SET CURLINC="C:\RNGE\Synchro\libcurl-7.16.0\include"
> > SET CURLLIB="C:\RNGE\Synchro\libcurl-7.16.0\lib"
> >
> > DEL rnx_synchro2.pid
> >
> > @ECHO ON
> > gcc -Wall rnx_synchro2.c md5.c -I%CINC% -I%PGINC% -I%CURLINC% -L%CLIB%
> > -L%PGLIB% -L%CURLLIB% -lcurl -lpq -o rnx_synchro2.exe
> > =========================================== fim
> >
> > Em 11/02/08, Fernando de Oliveira <[EMAIL PROTECTED]> escreveu:
> > >
> > > Pessoal,
> > > Estou tentando conectar ao Pg via libpq no windows xp utilizando o
> > > Dev-cpp,
> > > porém estou obtendo os seguintes erros ( Log do compilador ):
> > >
> > >
> > > ----------------------------------------------------------------------------------------------------------
> > > Executando  make.
> > > mingw32-make.exe -f "C:\Dev-Cpp\Projetos\testes\Makefile.win" all
> > > g++.exe Objects/MingW/main.o -o
> > > "Output\MingW\Teste.exe" -L"C:/Dev-Cpp/Lib" -L"C:/Arquivos de
> > > programas/PostgreSQL/8.3/lib"
> > >
> > > Objects/MingW/main.o:main.cpp:(.text+0xd): undefined reference to
> > > `PQfinish'
> > > Objects/MingW/main.o:main.cpp:(.text+0x69): undefined reference to
> > > `PQconnectdb'
> > > Objects/MingW/main.o:main.cpp:(.text+0x77): undefined reference to
> > > `PQstatus'
> > > Objects/MingW/main.o:main.cpp:(.text+0x86): undefined reference to
> > > `PQerrorMessage'
> > > Objects/MingW/main.o:main.cpp:(.text+0xc0): undefined reference to
> > > `PQexec'
> > > Objects/MingW/main.o:main.cpp:(.text+0xce): undefined reference to
> > > `PQresultStatus'
> > > Objects/MingW/main.o:main.cpp:(.text+0xde): undefined reference to
> > > `PQerrorMessage'
> > > Objects/MingW/main.o:main.cpp:(.text+0x105): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x11b): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x12e): undefined reference to
> > > `PQexec'
> > >
> > > Objects/MingW/main.o:main.cpp:(.text+0x13c): undefined reference to
> > > `PQresultStatus'
> > > Objects/MingW/main.o:main.cpp:(.text+0x14c): undefined reference to
> > > `PQerrorMessage'
> > > Objects/MingW/main.o:main.cpp:(.text+0x173): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x189): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x19c): undefined reference to
> > > `PQexec'
> > > Objects/MingW/main.o:main.cpp:(.text+0x1aa): undefined reference to
> > > `PQresultStatus'
> > > Objects/MingW/main.o:main.cpp:(.text+0x1ba): undefined reference to
> > > `PQerrorMessage'
> > > Objects/MingW/main.o:main.cpp:(.text+0x1e1): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x1f7): undefined reference to
> > > `PQnfields'
> > > Objects/MingW/main.o:main.cpp:(.text+0x21b): undefined reference to
> > > `PQfname'
> > > Objects/MingW/main.o:main.cpp:(.text+0x250): undefined reference to
> > > `PQntuples'
> > > Objects/MingW/main.o:main.cpp:(.text+0x27d): undefined reference to
> > > `PQgetvalue'
> > > Objects/MingW/main.o:main.cpp:(.text+0x2b2): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x2c5): undefined reference to
> > > `PQexec'
> > > Objects/MingW/main.o:main.cpp:(.text+0x2d3): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x2e6): undefined reference to
> > > `PQexec'
> > >
> > > Objects/MingW/main.o:main.cpp:(.text+0x2f4): undefined reference to
> > > `PQclear'
> > > Objects/MingW/main.o:main.cpp:(.text+0x2ff): undefined reference to
> > > `PQfinish'
> > > collect2: ld returned 1 exit status
> > >
> > > mingw32-make.exe: *** [Output/MingW/Teste.exe] Error 1
> > >
> > > Execução terminada
> > >
> > > --------------------------------------------------------------------------------------------------------
> > >
> > >
> > > Ja pesquisei no google, mas não consegui resolver o problema.
> > > Aparentemente
> > > é problema de linkagem, já tentei passar os parâmetros mas não deu
> > > certo..
> > >
> > > Alguém pode me ajudar?
> > >
> > > []s
> > > Fernando de Oliveira
> > >
> > > _______________________________________________
> > > pgbr-geral mailing list
> > > [email protected]
> > > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
> > >
> >
> >
> >
> > --
> > Atenciosamente,
> >
> > Alexsander da Rosa
> > Linux User #113925
> >
> > ------------------------------
> >
> > _______________________________________________
> > pgbr-geral mailing list
> > [email protected]
> > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
> >
> >
> > _______________________________________________
> > pgbr-geral mailing list
> > [email protected]
> > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
> >
> >
>
>
> --
> Atenciosamente,
>
> Alexsander da Rosa
> Linux User #113925
>
> ------------------------------
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>


-- 
Atenciosamente,

Alexsander da Rosa
Linux User #113925
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a