dbTalk Databases Forums  

Need your help

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Need your help in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Guru
 
Posts: n/a

Default Need your help - 04-10-2007 , 06:46 AM






Hi,
I am new to Berkeley DB.
I am using VC++ 6.0 to run the examples provided, but i am getting
this error
I have created a new Console application and trying to Build the
project, but i am get the below error. How do i overcome this?

Thanks & Regds,
Gururaj



--------------------Configuration: berkeley1 - Win32
Debug--------------------
Compiling...
excxx_example_database_load.cpp
Linking...
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _optarg
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _getopt
Debug/berkeley1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

berkeley1.exe - 3 error(s), 0 warning(s)


Reply With Quote
  #2  
Old   
Don Anderson
 
Posts: n/a

Default Re: Need your help - 04-10-2007 , 10:34 AM






Hello Gururaj,

getopt is a utility function from the Unix library, and optarg is
a global variable associated with this function. Try including
clib/getopt.c from the Berkeley DB source distribution, it's
a replacement for systems that don't have getopt.

You might also look at the build_windows/ex_access.dsp
project file in the source distribution, it is used to build the
examples, and it includes getopt.c.

- Don

On Apr 10, 7:46 am, "Guru" <parva... (AT) gmail (DOT) com> wrote:
Quote:
Hi,
I am new to Berkeley DB.
I am using VC++ 6.0 to run the examples provided, but i am getting
this error
I have created a new Console application and trying to Build the
project, but i am get the below error. How do i overcome this?

Thanks & Regds,
Gururaj

--------------------Configuration: berkeley1 - Win32
Debug--------------------
Compiling...
excxx_example_database_load.cpp
Linking...
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _optarg
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _getopt
Debug/berkeley1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

berkeley1.exe - 3 error(s), 0 warning(s)



Reply With Quote
  #3  
Old   
Guru
 
Posts: n/a

Default Re: Need your help - 04-11-2007 , 12:54 AM



Hi Don,
I tried including "clib/getopt.c" but i am getting the below errors, i
looked into the file "getopt.c" as well, but cud not find any
identifiable errors, if i am compiling just the "getopt.c" then it
compiles fine except for some warnings

_______________________________
excxx_example_database_load.cpp
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(89) :
error C2664: '__db_rpath' : cannot convert parameter 1 from 'char' to
'const char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(90) :
error C2440: '=' : cannot convert from 'char' to 'char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(97) :
error C2440: '=' : cannot convert from 'char' to 'char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(141) :
error C2440: '=' : cannot convert from 'char' to 'char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

berkeley1.exe - 4 error(s), 0 warning(s)






On Apr 10, 8:34 pm, "Don Anderson" <don.ander... (AT) gmail (DOT) com> wrote:
Quote:
Hello Gururaj,

getopt is a utility function from the Unix library, and optarg is
a global variable associated with this function. Try including
clib/getopt.c from the Berkeley DB source distribution, it's
a replacement for systems that don't have getopt.

You might also look at the build_windows/ex_access.dsp
project file in the source distribution, it is used to build the
examples, and it includes getopt.c.

- Don

On Apr 10, 7:46 am, "Guru" <parva... (AT) gmail (DOT) com> wrote:



Hi,
I am new to Berkeley DB.
I am using VC++ 6.0 to run the examples provided, but i am getting
this error
I have created a new Console application and trying to Build the
project, but i am get the below error. How do i overcome this?

Thanks & Regds,
Gururaj

--------------------Configuration: berkeley1 - Win32
Debug--------------------
Compiling...
excxx_example_database_load.cpp
Linking...
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _optarg
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _getopt
Debug/berkeley1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

berkeley1.exe - 3 error(s), 0 warning(s)- Hide quoted text -

- Show quoted text -



Reply With Quote
  #4  
Old   
Guru
 
Posts: n/a

Default Re: Need your help - 04-11-2007 , 04:02 AM



On Apr 11, 10:54 am, "Guru" <parva... (AT) gmail (DOT) com> wrote:
Quote:
Hi Don,
I tried including "clib/getopt.c" but i am getting the below errors, i
looked into the file "getopt.c" as well, but cud not find any
identifiable errors, if i am compiling just the "getopt.c" then it
compiles fine except for some warnings

_______________________________
excxx_example_database_load.cpp
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(89) :
error C2664: '__db_rpath' : cannot convert parameter 1 from 'char' to
'const char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(90) :
error C2440: '=' : cannot convert from 'char' to 'char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(97) :
error C2440: '=' : cannot convert from 'char' to 'char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
c:\berkeleydb\db-4.5.20\examples_cxx\getting_started\getopt.c(141) :
error C2440: '=' : cannot convert from 'char' to 'char *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

berkeley1.exe - 4 error(s), 0 warning(s)

On Apr 10, 8:34 pm, "Don Anderson" <don.ander... (AT) gmail (DOT) com> wrote:



Hello Gururaj,

getopt is a utility function from the Unix library, and optarg is
a global variable associated with this function. Try including
clib/getopt.c from the Berkeley DB source distribution, it's
a replacement for systems that don't have getopt.

You might also look at the build_windows/ex_access.dsp
project file in the source distribution, it is used to build the
examples, and it includes getopt.c.

- Don

On Apr 10, 7:46 am, "Guru" <parva... (AT) gmail (DOT) com> wrote:

Hi,
I am new to Berkeley DB.
I am using VC++ 6.0 to run the examples provided, but i am getting
this error
I have created a new Console application and trying to Build the
project, but i am get the below error. How do i overcome this?

Thanks & Regds,
Gururaj

--------------------Configuration: berkeley1 - Win32
Debug--------------------
Compiling...
excxx_example_database_load.cpp
Linking...
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _optarg
excxx_example_database_load.obj : error LNK2001: unresolved external
symbol _getopt
Debug/berkeley1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

berkeley1.exe - 3 error(s), 0 warning(s)- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Hi Don,
Thanks for ur help, i was able to fix the problem, the "clib/getopt.c"
had some problems so i just added these function definitions into my
code and now it works fine.

Thanks,
Gururaj



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.