I'm newbie

Started by Mohsen Pahlevanzadehabout 21 years ago8 messagesgeneral
Jump to latest
#1Mohsen Pahlevanzadeh
mohsen@pahlevanzadeh.org

Dears,
I'm writting a package which is pgsql-base under RH9.
I need to a small Makefile for compiling my package.
Please guide me....

#2Richard Huxton
dev@archonet.com
In reply to: Mohsen Pahlevanzadeh (#1)
Re: I'm newbie

Mohsen Pahlevanzadeh wrote:

Dears,
I'm writting a package which is pgsql-base under RH9.
I need to a small Makefile for compiling my package.
Please guide me....

Can you give more information about what you're trying to do?
Do you need general Makefile help, or are you having problems linking to
PostgreSQL libraries?

--
Richard Huxton
Archonet Ltd

#3Mohsen Pahlevanzadeh
mohsen@pahlevanzadeh.org
In reply to: Richard Huxton (#2)
Re: I'm newbie

I know about Makefile,But i need to write a Makefile that i can
communicate with pgsql & its library & header file from C++.

Show quoted text

Mohsen Pahlevanzadeh wrote:

Dears,
I'm writting a package which is pgsql-base under RH9.
I need to a small Makefile for compiling my package.
Please guide me....

Can you give more information about what you're trying to do?
Do you need general Makefile help, or are you having problems linking to
PostgreSQL libraries?

--
Richard Huxton
Archonet Ltd

#4Richard Huxton
dev@archonet.com
In reply to: Mohsen Pahlevanzadeh (#3)
Re: I'm newbie

Mohsen Pahlevanzadeh wrote:

I know about Makefile,But i need to write a Makefile that i can
communicate with pgsql & its library & header file from C++.

I'm afraid I still don't understand what you mean. If you are looking
for C++ libraries so you can access a PostgreSQL database, then you
probably want libpqxx:
http://gborg.postgresql.org/project/libpqxx/projdisplay.php
There's an older version at:
http://gborg.postgresql.org/project/libpqpp/projdisplay.php

There are two project sites for PostgreSQL, gborg is the older one,
pgfoundry the new one.
http://pgfoundry.org/

Does that help at all?

--
Richard Huxton
Archonet Ltd

#5Mohsen Pahlevanzadeh
mohsen@pahlevanzadeh.org
In reply to: Richard Huxton (#4)
Re: I'm newbie

Dear Richard:
1.Thank you for reply
2.Dear Richard,I must write a Makefile for my client packge.But i don't
know on pgsql's library & path of its include-files.
Please guide me on writting a Makefile for a client packege with pgsql.
Yours,Mohsen

Show quoted text

Mohsen Pahlevanzadeh wrote:

I know about Makefile,But i need to write a Makefile that i can
communicate with pgsql & its library & header file from C++.

I'm afraid I still don't understand what you mean. If you are looking
for C++ libraries so you can access a PostgreSQL database, then you
probably want libpqxx:
http://gborg.postgresql.org/project/libpqxx/projdisplay.php
There's an older version at:
http://gborg.postgresql.org/project/libpqpp/projdisplay.php

There are two project sites for PostgreSQL, gborg is the older one,
pgfoundry the new one.
http://pgfoundry.org/

Does that help at all?

--
Richard Huxton
Archonet Ltd

#6Richard Huxton
dev@archonet.com
In reply to: Mohsen Pahlevanzadeh (#5)
Re: I'm newbie

Mohsen Pahlevanzadeh wrote:

Dear Richard:
1.Thank you for reply
2.Dear Richard,I must write a Makefile for my client packge.But i don't
know on pgsql's library & path of its include-files.

Depends on how you installed PostgreSQL. If it's via RPM then you can
see what files are installed with "rpm -ql"
rpm -ql postgresql
rpm -ql postgresql-libs
If you installed via source, the files you want are probably somewhere
like /usr/local/pgsql/...

Please guide me on writting a Makefile for a client packege with pgsql.

Well, if you want a guide to developing software, you might start with:
http://www.tldp.org/HOWTO/Software-Building-HOWTO.html

Some questions for you:
1. Do you know how to write a Makefile for your C++ application without
PostgreSQL?
2. Are you linking to other databases at the moment?
3. Do you know how/where you installed PostgreSQL?
4. Have you read the documentation on libpq in the manuals?
5. Did you download/read and documentation from the libpqxx/pp links I
provided yesterday?

--
Richard Huxton
Archonet Ltd

#7Mohsen Pahlevanzadeh
mohsen@pahlevanzadeh.org
In reply to: Richard Huxton (#6)
Re: I'm newbie

Mohsen Pahlevanzadeh wrote:

Dear Richard:
1.Thank you for reply
2.Dear Richard,I must write a Makefile for my client packge.But i don't
know on pgsql's library & path of its include-files.

Depends on how you installed PostgreSQL. If it's via RPM then you can
see what files are installed with "rpm -ql"
rpm -ql postgresql
rpm -ql postgresql-libs
If you installed via source, the files you want are probably somewhere
like /usr/local/pgsql/...

Please guide me on writting a Makefile for a client packege with pgsql.

Well, if you want a guide to developing software, you might start with:
http://www.tldp.org/HOWTO/Software-Building-HOWTO.html

Some questions for you:
1. Do you know how to write a Makefile for your C++ application without
PostgreSQL?

Yes,I know.

2. Are you linking to other databases at the moment?

yes.

3. Do you know how/where you installed PostgreSQL?

I don't know,Becuase RH9 has it default.

4. Have you read the documentation on libpq in the manuals?

yes,But i haven't found any on Makefile.

5. Did you download/read and documentation from the libpqxx/pp links I
provided yesterday?

no,Because i think it no related to my topic.

Show quoted text

--
Richard Huxton
Archonet Ltd

#8Daniel Verite
daniel@manitou-mail.org
In reply to: Mohsen Pahlevanzadeh (#5)
Re: I'm newbie

Mohsen Pahlevanzadeh wrote:

2.Dear Richard,I must write a Makefile for my client packge.But i don't
know on pgsql's library & path of its include-files.

You can call pg_config in your makefile.
See http://www.postgresql.org/docs/7.4/static/app-pgconfig.html
or man pg_config

--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org