![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Was the query constructed with new? The error is happening because the pointer doesn't point to one of VC++'s heaps. -----Original Message----- From: Thomas Werth <thomas.werth (AT) vahle (DOT) de To: MySQL++ Mailing List <plusplus (AT) lists (DOT) mysql.com Sent: Thu, 18 Aug 2005 11:11:03 +0200 Subject: problems using mysql++ > 2.0.0 Hello, I'm using mysql++ for a project in vc2003. Now h'm trying to switch to new lib version. I managed to compile mysqlpp lib using makefiles. When using makefiles i notice 2 things. First when running "makemake.bat vc" i get an error "make.bat not found". When looking into makemake.bat i discovered at end of file a "call make.bat" whereas this make.bat isn't created in mysqlpp root dir nor is it delivered in basic install. I'm just ignoring this ![]() Second this is a harder problem. Using mysqlpp as dll in release version of my project seem to run fine. Unfortunately in debug it always crashes when a local var ( like Query ) is destructed. It throws an assertion using internal debug func "_CrtIsValidHeapPointer". When looking a Readme.vc at part "Using MySQL++ in Your Own Projects" Debug settings are shown this way Under Linker::General add to "Additional Library Directories": "c:\mysql\lib\debug, c:\mysql++\vc\lib" for the Debug configuration. For the Release configuration, make it "c:\mysql\lib\opt, c:\mysql++\lib" Unfortunately no vc subdir is created. I set "INST_DIR=F:\dev\Projekte\cpp\mysql++\vc" in makefile.vc in lib dir, but nothing is created neither dir nor any files in there. What am i doing wrong ? How do i tell makefile to create a debug version of lib ? greets Thomas Werth -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsu... aol (DOT) com |
#3
| ||||
| ||||
|
|
First when running "makemake.bat vc" i get an error "make.bat not found". |
|
Using mysqlpp as dll in release version of my project seem to run fine. Unfortunately in debug it always crashes when a local var ( like Query ) is destructed. It throws an assertion using internal debug func "_CrtIsValidHeapPointer". |
|
Unfortunately no vc subdir is created. |
|
How do i tell makefile to create a debug version of lib ? |
#4
| ||||
| ||||
|
|
Achtung Mysql++ hat Speicherloch bei Query.store() in combination mit std::string |
|
//Backslashes doublen replaceSubstring( &sql, "\\", "\\\\" ); |
|
query << sql.c_str(); |
|
When running in try block right after leaving with return debug assert hits in . |
#5
| |||
| |||
|
|
Thomas Werth wrote: First when running "makemake.bat vc" i get an error "make.bat not found". Sorry, make.bat was accidentally left out of the distribution. Using mysqlpp as dll in release version of my project seem to run fine. Unfortunately in debug it always crashes when a local var ( like Query ) is destructed. It throws an assertion using internal debug func "_CrtIsValidHeapPointer". Please help me debug this. I don't use Visual C++ with MySQL++ personally (I have it here for other reasons), so there's a limit to how much effort I'm willing to put into this myself. Unfortunately no vc subdir is created. There are several errors in the makemake system when using cmd.exe. I tested under a different command shell, and didn't realize that there were so many differences between the two. I'll release v2.0.2 soon to fix this and the make.bat problem. How do i tell makefile to create a debug version of lib ? cl /? |
#6
| |||
| |||
|
|
I figured out how to set up makefile.vc to produce a mysqlppd.lib and mysqlppd.dll for use in debug version of linked app. Here's snippelt, path need to be adapted : |
|
Still INST_DIR Var seems to be useless cause no "vc" is created ... |
|
maybe you can include in next distribution some kind of my appended makefile so users simply can rename between release and Debug makefiles whereas release may stay as default. |
![]() |
| Thread Tools | |
| Display Modes | |
| |