Jump to content


Photo

error: "class Db" has no member named "exists"


  • Please log in to reply
4 replies to this topic

#1 robzy

robzy

    Initiate

  • Hero
  • 42,765 posts

Posted 12 February 2011 - 05:59 PM

Okay, so I get an error when compiling, and I'm trying to track down the source of the problem (since dependencies on this system are a bit strange). The problem is that I can't seem to find where "class Db" actually originates from. Any suggestions on how I could track it down?

[root@localhost src]# make -f makefile.unix bitcoind
	g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -I"/usr/local/include/wx-2.9" -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" -o obj/nogui/util.o util.cpp
	db.h: In member function ‚bool CDB::Exists(const K&)‚:
	db.h:146: error: ‚class Db‚ has no member named ‚exists‚
	make: *** [obj/nogui/util.o] Error 1
[root@localhost src]# grep -R "Db" ./ | grep -v "Dbt" | grep -v "Dbc" | grep -v "DbT"
	./db.cpp:static bool fDbEnvInit = false;
	./db.cpp:DbEnv dbenv(0);
	./db.cpp:static map<string, Db*> mapDb;
	./db.cpp:		if (fDbEnvInit)
	./db.cpp:			fDbEnvInit = false;
	./db.cpp:		if (!fDbEnvInit)
	./db.cpp:			fDbEnvInit = true;
	./db.cpp:		pdb = mapDb[strFile];
	./db.cpp:			pdb = new Db(&dbenv, 0);
	./db.cpp:			mapDb[strFile] = pdb;
	./db.cpp:void CloseDb(const string& strFile)
	./db.cpp:		if (mapDb[strFile] != NULL)
	./db.cpp:			Db* pdb = mapDb[strFile];
	./db.cpp:			mapDb[strFile] = NULL;
	./db.cpp:	printf("DBFlush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started");
	./db.cpp:	if (!fDbEnvInit)
	./db.cpp:				CloseDb(strFile);
	./db.cpp:			fDbEnvInit = false;
	./db.cpp:						CloseDb(strFile);
	./db.cpp:				CloseDb(strFile);
	./db.h:extern DbEnv dbenv;
	./db.h:	Db* pdb;
[root@localhost src]#

Thanks,
Rob.

#2 SledgY

SledgY

    Primarch

  • Atomican
  • 917 posts

Posted 13 February 2011 - 09:08 AM

locate would be a good start. See if the file actually exists somewhere. Could be you need to install an additional package for "WXWindows"? I assume that is the library you are using.
poweredbypenguins.org - SledgY lives in the cloud...

#3 robzy

robzy

    Initiate

  • Hero
  • 42,765 posts

Posted 13 February 2011 - 10:21 AM

locate would be a good start. See if the file actually exists somewhere.

Which file?

Could be you need to install an additional package for "WXWindows"? I assume that is the library you are using.

I don't actually have WxWidgets installed, that's why I'm compiling "bitcoind" (as opposed to "bitcoin", which spits out many errors about missing WxWidgets header files) which doesn't require WxWidgets. I see no reason to suspect this compiler error is due to WxWidgets.

Rob

Edited by robzy, 13 February 2011 - 10:25 AM.


#4 robzy

robzy

    Initiate

  • Hero
  • 42,765 posts

Posted 13 February 2011 - 10:42 AM

Okay, something funny was going on with the dependencies. CentOS has a number of older libraries, and it would appear BitCoin didn't like them.

Using these notes as a guide I was able to compile all the required dependancies to their own directory and just point the BitCoin build at them.

Rob.

#5 nicephotog-jvm.net

nicephotog-jvm.net

    Overlord

  • Atomican
  • 390 posts

Posted 26 October 2011 - 12:31 AM

"class" ... presumably in cpp definitive keyword concievabley but not nescissarilly maybe in the actual DB name as in a school not the programming language.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users