'm surprised I haven't seen other posts concerning this.

I have an XP system with VC++ 2008 and a MySQL 5.1 database.
I was told the groovy way to connect was using a library called MySQL++ 3.0.1.
After two days I finally got the mysqlpp.lib and mysqlpp_d.lib libraries to compile (Release and Debug).

However now a simple connection to a db crashes using the Release version because a variable, [as I see it] DBDriver::applied_options_, is not initialized when calling new ReadDefaultFileOption("my"). When I use the Debug version no problem.

I march through each time with step-by-step and in Debug the value of applied_options_ is "[]()" and the for loop (see below) is hopped over. However in Release and the same ("[]()") value of applied_options_ this for loop causes a run time error!!

Code:
class DBDriver 

in DBDriver::connect(...)
...
set_option_default(new ReadDefaultFileOption("my"));
...

	std::string set_option_default(Option* o)
	{
		const std::type_info& ti = typeid(o);
		for (OptionList::const_iterator it = applied_options_.begin();
				it != applied_options_.end(); 
				++it) {
			if (typeid(*it) == ti) {
				delete o;
				return "";		// option of this type already set
			}
		}

		return set_option(o);
	}
So the mysqlpp_d.lib works and the mysqlpp.lib doesn't.

I cannot go stepping into ReadDefaultFileOption("my") to see the manner of initializing applied_options_ that I suspect is the problem. There is no source code for this function.

What can I do? Have I done anything unforgivable in these compiler and linking options?? Any help would be appreciated.
I will show the compiler options and linker options for both versions here.

Debug version of mysqlpp_d.lib

Compiler Options :
/Od /Ob1 /I "C:\Program Files\MySQL\MySQL Server 5.0\include" /I "C:\mysql++\mysql++-3.0.1\lib" /D "_USRDLL" /D "DLL_EXPORTS" /D "_DEBUG" /D "UNICODE" /D "_UNICODE" /D "MYSQLPP_MAKING_DLL" /D "HAVE_MYSQL_SSL_SET" /D "_WINDLL" /Gm /EHsc /RTC1 /MDd /Fo"C:\mysql++\mysql++-3.0.1\vc2005\Debug\mysqlpp\\" /Fd"C:\mysql++\mysql++-3.0.1\vc2005\Debug\mysqlpp_d.pdb" /W1 /nologo /c /Zi /TP /errorReportrompt

Linker Options :
/OUT:"C:\mysql++\mysql++-3.0.1\vc2005\Debug\mysqlpp_d.dll" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Programme\MySQL\MySQL Server 5.1\lib\debug" /LIBPATH:"C:\NewLib\Debug" /DLL /MANIFEST /MANIFESTFILE:"C:\mysql++\mysql++-3.0.1\vc2005\Debug\mysqlpp\mysqlpp_d.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\mysql++\mysql++-3.0.1\vc2005\Debug\mysqlpp_d.pdb" /DYNAMICBASE:NO /IMPLIB:"C:\mysql++\mysql++-3.0.1\vc2005\Debug\mysqlpp_d.lib" /MACHINE:X86 /ERRORREPORT:PROMPT libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib


Release version of mysqlpp.lib

Compiler Options :
/Od /Ob1 /I "C:\Program Files\MySQL\MySQL Server 5.0\include" /I "C:\mysql++\mysql++-3.0.1\lib" /D "_USRDLL" /D "DLL_EXPORTS" /D "UNICODE" /D "_UNICODE" /D "MYSQLPP_MAKING_DLL" /D "HAVE_MYSQL_SSL_SET" /D "_WINDLL" /Gm /EHsc /RTC1 /MD /Fo"C:\mysql++\mysql++-3.0.1\vc2005\Release\mysqlpp\\" /Fd"C:\mysql++\mysql++-3.0.1\vc2005\Release\mysqlpp.pdb" /W1 /nologo /c /Zi /TP /errorReportrompt

Linker Options :
/OUT:"C:\mysql++\mysql++-3.0.1\vc2005\Release\mysqlpp.dll" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Programme\MySQL\MySQL Server 5.1\lib\opt" /LIBPATH:"C:\NewLib\Release" /DLL /MANIFEST /MANIFESTFILE:"C:\mysql++\mysql++-3.0.1\vc2005\Release\mysqlpp\mysqlpp.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\mysql++\mysql++-3.0.1\vc2005\Release\mysqlpp.pdb" /DYNAMICBASE:NO /IMPLIB:"C:\mysql++\mysql++-3.0.1\vc2005\Release\mysqlpp.lib" /MACHINE:X86 /ERRORREPORT:PROMPT libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib