0

这里有人在 Visual Studio 2008 x64 下构建 libpqxx 吗?我已经建立了它。使用 libpqxx_staticD.lib 调试工作正常,但使用 libpqxx_static.lib 发布失败

pqxx::connection conn(...);

调用堆栈:

postgres.exe!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,pqxx::notification_receiver *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,pqxx::notification_receiver *> >,1> >::_Init()  + 0x60 bytes 
postgres.exe!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,pqxx::notification_receiver *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,pqxx::notification_receiver *> >,1> >::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,pqxx::notification_receiver *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,pqxx::notification_receiver *> >,1> >()  + 0x6c bytes    
postgres.exe!std::multimap<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,pqxx::notification_receiver *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,pqxx::notification_receiver *> > >::multimap<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,pqxx::notification_receiver *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,pqxx::notification_receiver *> > >()  + 0x3f bytes    
postgres.exe!pqxx::connection_base::connection_base()  + 0x83 bytes 
postgres.exe!pqxx::basic_connection<pqxx::connect_direct>::basic_connection<pqxx::connect_direct>(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & opt="host=localhost user=tka4 password=sga19791988 dbname=sfMakseq")  Line 65 + 0x2d bytes   C++
postgres.exe!main(int argc=5, char * * argv=0x00000000003470b0)  Line 36 + 0x40 bytes   C++
postgres.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes

错误信息:

“postgres.exe 中 0x000000013f0612e0 处未处理的异常:0xC0000005:访问冲突写入位置 0x0000000077225418。”

可能你知道我做错了什么吗?

4

1 回答 1

1

所以,首先我使用 /machine:x64 而不是 /machine:I386。这是我的错误。它应该是 /machine:amd64 和“vcvarsall.bat amd64”。

于 2013-02-28T08:46:37.257 回答