Hmmm. Very strange. Perhaps there's a mismatch between your program 
settings and the settings of libpqxx. Check the compiler flags given in 
the libpqxx compile of the library you're using (debug static, I 
assume?) with the ones used in your program. (The VC++ project settings 
dialog shows you the exact command line settings.) The differences may 
cause binary incompatibilities in C++ programs -- I've seen this happen 
before.

BTW, do the problems also occur if you keep main() completely empty? ;-)

Cheers,
Bart


DEV wrote:
> With the code you sent.  The exception was great it would tell me that I
> need more for the connection but I would still get that!  If I put any more
> code into it I get more of them but it "works".
> 
> -----Original Message-----
> From: Bart Samwel [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 11, 2006 9:08 AM
> To: DEV
> Cc: [email protected]
> Subject: Re: [libpqxx-general] Almost there
> 
> DEV wrote:
>> Okay this worked from what I can tell.  I still get a debug window 3 times
>> that I would like to get rid of if I could but the exception was very
>> helpful in telling me what was missing from the connection data.
>>
>> I have attached images of the debug windows if anyone has a clue how to
> get
>> rid of them please let me know.
> 
> Youch. This is a message from VC++'s debug memory manager. Memory 
> corruption! Does this happen with the short fragment of code below, or 
> only with a larger program?
> 
> --Bart
> 
> 
> 
> In reply to Bart Samwel's message:
>> Could you try changing main() to something like:
>>
>> int main()
>> {
>>      std::cout << "Before start." << std::endl;
>>      try
>>      {
>>        connection Conn("dbname=template1");
>>      }
>>      catch(std::exception& e)
>>      {
>>        std::cout << "Exception: " << e.what() << std::endl;
>>      }
>>      return 0;
>> }
>>
>> Then run it, and see which parts are printed. (I'm interested to see if 
>> it gets to the beginning of main() at all, and if so, I'm interested to 
>> see if an exception is thrown. I seem to remember that the error message 
>> that you're getting corresponds to an uncaught exception.)
> 
> 
> 
> _______________________________________________
> Libpqxx-general mailing list
> [email protected]
> http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to