List:MySQL++« Previous MessageNext Message »
From:Roland Hill Date:April 24 2007 12:02am
Subject:Re: Visual C++ Release build
View as plain text  
Michael,

I also had some strange behaviour using mysql++ in Visual C++. I haven't 
checked this thoroughly, but I have found the errors went away when I 
made sure I was using a debug version of mysqlpp.dll with my debug code 
and a release version with my release code. The easiest way is to 
compile both versions of the dll and copy the appropriate ones to your 
\debug and \release folders with the executables.

Roland


Michael Nye wrote:
> Hi all,
>
> I have recently create a program in visual c++ using mysql++ and am 
> now on the stage of looking to create an executable for distribution.  
> As such I am now trying to make my program work under a Release 
> build.  I have followed configuration settings from the example wforms 
> for the Release build and the form will load up fine.  However when I 
> click the button which executes a query, it seems to get stuck at the 
> line,
>
> mysqlpp::Result res = query.store(query_stdstr);  
> where query_stdstr is just a simple query (eg. SELECT * FROM staff 
> WHERE staff_name = 'joe').  The query object has been setup using 
> mysqlpp::Query query = con.query(); and has successfully connected to 
> the database.  Once the program tries to execute the query the form 
> will simply close itself down normally (no crash/error warning).  It 
> is very strange for me because the program works fully in Debug mode 
> but is having this trouble in release mode.  If I change the coding to 
> simply print the text "hello world" on a label on the form instead of 
> executing the query it works fine, so it seems to me to be something 
> wrong with my settings relating to mysql++ or an incompatibility.
>
> So my question is has anyone else encountered a release build visual 
> c++ program or know why there would be problems like above?
> Thanks for any help,
>
> Michael.
>
Thread
MySQL++ v2.2.2 release imminentWarren Young12 Apr
  • Re: MySQL++ v2.2.2 release imminentRemi Collet12 Apr
  • Visual C++ Release buildMichael Nye23 Apr
    • Re: Visual C++ Release buildDrew M.23 Apr
    • Re: Visual C++ Release buildRoland Hill24 Apr
      • Re: Visual C++ Release buildWarren Young24 Apr
        • Re: Visual C++ Release buildMichael Nye24 Apr
Re: Visual C++ Release buildRoland Hill24 Apr
  • Re: Visual C++ Release buildWarren Young25 Apr