List:MySQL++« Previous MessageNext Message »
From:Andre Sodermans Date:March 29 2007 4:15am
Subject:Re: Problems with Visual C++
View as plain text  
> Just letting you know I have *finally* got my problem fixed.  Inside
> preprocessor, i had MAKE_MYSQLPP_DLL declared (I must of read this 
> somewhere) which apparantly was building an incorrect mysqlpp.dll.  I

> removed this from the preprocessor, and copied the mysqlpp.dll file
> the mysql++/debug (i think it was /debug) directory into my project 
> directory, and it solved the link errors.  How I found this was when
> was trialing and erroring different settings I removed the 
> MAKE_MYSQLPP_DLL line and it compiled/linked fine but couldn't find
> mysqlpp.dll, which made me think about how sample1 was doing it, and
> just had the mysqlpp.dll in the project directory.  In summary for 
> people with troubles with this I think the major things were:
> - Make sure sample1 from mysql++ works
> - Copy the majority of the linker / C/C++ settings from sample1 into
> windows forms project (but keep stuff like Systems as Windows)
> - Run install.bat in command prompt and copy the folders from
> into your install directory
> - Follow and don't worry about the managed extensions bit
> the start, it doesn't seem to be an option anymore.  Ensure you have
> linker libraries correct (check the folders your linking to and see 
> whether the .lib files or whatever you are using are actually in 
> there).  Do the same for the include file directories and in sample1 
> where it just says "debug" link to your mysql++ install directory
> - Copy mysqlpp.dll from your mysql++\debug directory into your
> folder
> I think that's all that I ended up changing, I don't know which steps

> could be skipped etc. because once it worked I just wanted to get 
> started and not play around seeing exactly how it worked.  Just alot
> trial and error is needed, alot of the errors you can search for the 
> codes on google and see similar problems and try to relate it to

(We have emailed each other a couple of times, and thanks again for
your help)

I also got my app to work and wanted to contribute my 2cents here. 

It was the Common Language Runtime setting under General Settings that
caused the majority of my problems. By default, VC++ sets this to: 

My suggestions after successfully running the mysql++ examples from the
commandline and if you insist on using a Windows Forms GUI app (the
settings that follow are for debug):

1) make sure to select /clr under General Settings-common language
runtime support

2) you *have* to select Multi-threaded Debug DLL (/MDd) in  C/C++ -
Code Generation - Runtime Library
it won't let you link to a static runtime - why? don't ask me probably
something to do with redistribution

3) set C/C++ - Precompiled Headers - Create/Use Precompiled Header to
'Not Using Precompiled Headers'

4) put the msqlpp.dll in project folder or in the folder where the
executable is located, i.e. <project folder>\debug or somewhere in your

(I am not sure why step 4 is required - I built the mysql++ library as
static but it somehow still insists on finding the dll)


It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
Problems with Visual C++Michael Nye23 Mar
  • Re: Problems with Visual C++Warren Young23 Mar
    • Re: Problems with Visual C++Michael Nye24 Mar
      • Re: Problems with Visual C++gary clark24 Mar
        • Re: Problems with Visual C++Michael Nye25 Mar
          • RE: Problems with Visual C++Jim Wallace25 Mar
            • Re: Problems with Visual C++Michael Nye26 Mar
              • RE: Problems with Visual C++Jim Wallace26 Mar
                • Re: Problems with Visual C++Michael Nye28 Mar
        • Re: Problems with Visual C++Michael Nye26 Mar
Re: Problems with Visual C++Andre Sodermans29 Mar
  • Re: Problems with Visual C++Warren Young29 Mar
    • RE: Problems with Visual C++Matt Dargavel29 Mar
    • Re: Problems with Visual C++Warren Young29 Mar