EXTERNAL: Re: [odb-users] Question on Using ODB within a DLL

Boris Kolpackov boris at codesynthesis.com
Fri Jun 24 11:36:00 EDT 2011


Hi Thomas,

Szumowski, Thomas <thomas.szumowski at lmco.com> writes:

> I attached a MSVC++ 2010 project that results in the described error. 
> The test() call fails upon create_database.

I just tried your test under the VC++ 2010 debugger and it works fine
for me. I even examined the output file (a.sql) and it contains the
expected data. My only guess would be that some of the DLLs are not
loaded. Here are the entries in the Output windows in the debugger
that I see after executing the LoadLibrary() function:

'dbtest.exe': Loaded 'C:\projects\testdb\bin\dbtest.exe', Symbols loaded.
'dbtest.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'dbtest.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'dbtest.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'dbtest.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'dbtest.exe': Loaded 'C:\projects\testdb\bin\DatabaseDLL.dll', Symbols loaded.
'dbtest.exe': Loaded 'C:\projects\odb\libodb-sqlite\bin\odb-sqlite-d-1.4-vc10.dll', Symbols loaded.
'dbtest.exe': Loaded 'C:\projects\odb\libodb\bin\odb-d-1.4-vc10.dll', Symbols loaded.
'dbtest.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'dbtest.exe': Loaded 'C:\projects\sqlite\bin\sqlite3.dll', Symbols loaded.
'dbtest.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'dbtest.exe': Unloaded 'C:\projects\testdb\bin\DatabaseDLL.dll'
'dbtest.exe': Unloaded 'C:\projects\odb\libodb-sqlite\bin\odb-sqlite-d-1.4-vc10.dll'
'dbtest.exe': Unloaded 'C:\projects\sqlite\bin\sqlite3.dll'
'dbtest.exe': Unloaded 'C:\Windows\SysWOW64\msvcr100.dll'
'dbtest.exe': Unloaded 'C:\projects\odb\libodb\bin\odb-d-1.4-vc10.dll'
'dbtest.exe': Unloaded 'C:\Windows\SysWOW64\msvcp100d.dll'

Can you check if you get something similar. The DLLs of interest are
odb-sqlite-d-1.4-vc10.dll, sqlite3.dll, and odb-d-1.4-vc10.dll.

If all this looks similar, can you set a breakpoint (before the call
to LoadLibrary()) in libodb/odb/details/win32/dll.cxx at the beginning
of DllMain() and see if it is called?

Boris



More information about the odb-users mailing list