Re: BDB simple program compile problem

2008-03-23 Thread mike
> # cc t2.c To compile use cc -I/usr/local/include/db -o t2 t2.c -L/usr/local/lib/db -ldb -Mike

Re: BDB simple program compile problem

2008-03-20 Thread Michael Spratt
I read the part on -l -L wow it finally made more sense, and compiled a bit before your response, thanks for your response. Thanks though really your turse and rude messages prompted me to read more. :) Cc -o t2 t2.c -L/usr/local/lib/db -ldb did work Your right I do have no experience tha

Re: BDB simple program compile problem

2008-03-20 Thread Unix Fan
> ../usr/bin/ld: cannot find -l/usr/local/lib Consider that a test.. or an example of my drunken state, regardless of that.. It's obvious that you have no experience with the options of the compiler.. You failed the test. ;) Change it to -L/usr/local/lib Read manual pages: gcc(1) and

Re: BDB simple program compile problem

2008-03-20 Thread Michael Spratt
I used the line you gave and got the following error Actually I used "gcc -I/usr/local/include/db -o t2 t2.c -l/usr/local/lib -ldb Got /usr/bin/ld: cannot find -l/usr/local/lib collect2: ld returned 1 exit status I'm running as root because the machine is not on the net and I'm just trying to get

Re: BDB simple program compile problem

2008-03-19 Thread Unix Fan
> COMPILE OUTPUT- > # cc t2.c Why, are you running this as root?.. > /tmp//ccdm8869.o(.text+0x1c): In function `main': > : undefined reference to `db_create' Isn't this message rather obvious? can you not read or something? > /tmp//ccdm8869.o(.text+0x32): In function `main

Re: BDB simple program compile problem

2008-03-19 Thread Mats O Jansson
If the include you need is in /usr/local/include dont include the one in /usr/include. -moj On Wed, 19 Mar 2008, Michael Spratt wrote: on openbsd4.2 installed db-3.1.17p8 trying to compile this simple c program using the BerkeleyDB Could anyone help me trouble shoot my cc line optons? I believ

BDB simple program compile problem

2008-03-19 Thread Michael Spratt
on openbsd4.2 installed db-3.1.17p8 trying to compile this simple c program using the BerkeleyDB Could anyone help me trouble shoot my cc line optons? I believe there is a problem with the program seing the library? I want to statically link the libray. >include dir is /usr/local/include/db # pwd