`
chenqi210
  • 浏览: 78906 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表

automake windows dll

最近的libtool工具可以生成各种库文件.包括静态库与动态库.使用这个即可   示例configure.ac   # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) AC_INIT([librfc], [1.0], [http://www.sourceforge.net]) AM_INIT_AUTOMAKE([-Wall -Wer ...

模板参数 函数指针

    博客分类:
  • c++
http://stackoverflow.com/questions/5507377/template-type-deduction-for-a-pointer-to-member-function 写道 For a.connect<double> (&GApp::foo), both the foo(double) and foo(double, double) will match the overload of connect with one, and with two template parameters respectively (in the case ...
Some people says that Thread.Abort is evil.But the following is what the msdn says. http://msdn.microsoft.com/en-us/library/system.threading.threadabortexception.aspx using System; using System.Threading; using System.Security.Permissions; public class ThreadWork { public static void DoWo ...
OS:windows7 32bit g++ 4.5.2下编译正常,无错。vs2010下出问题stack around variable 'ac' is corruptted   bool Connection::getAutocommit() { SQLSMALLINT ac = 0; SQLRETURN ret = m_handle->getAttribute( SQL_ATTR_AUTOCOMMIT, ac); m_handle->checkError(ret); return ac == SQL_AUTOCOMMIT_ON; }   ...
ODBC应用程序API使用顺序 http://msdn.microsoft.com/en-us/library/ms714078%28v=VS.85%29.aspx  

cautions of SQLGetData

    博客分类:
  • ODBC
http://msdn.microsoft.com/en-us/library/ms715441.aspx 写道 There are two exceptions to these restrictions and a driver's ability to relax them. First, SQLGetData should never be called for a forward-only cursor when the rowset size is greater than 1. Second, if a driver supports bookmarks, it must ...

ODBC Cursor

    博客分类:
  • ODBC
  http://msdn.microsoft.com/en-us/library/aa215458%28v=sql.80%29.aspx 写道 To set cursor options Call SQLSetStmtAttr to set or SQLGetStmtAttr to get the statement options that control cursor behavior. Foption Specifies SQL_ATTR_CURSOR_TYPE Cursor type of forward-only, static, dynamic ...
如果只设置 SQL_ATTR_ROW_ARRAY_SIZE > 1,而在绑定列的时候依然是SQL_ATTR_ROW_ARRAY_SIZE == 1时的缓存大小,在vc运行中将会导致一个HEAP_CORRUPT。在mingw中可能什么也不报,但是程序就停止在读数据的地方。 所以一定要在SQL_ATTR_ROW_ARRAY_SIZE ...

event

    博客分类:
  • c++
#ifndef ODBCLIB_CORE_EVENT_EVENT_H #define ODBCLIB_CORE_EVENT_EVENT_H #include "Event.template" #include "Event.implement" #endif   #ifndef ODBCLIB_CORE_EVENT_EVENT_TEMPLATE #define ODBCLIB_CORE_EVENT_EVENT_TEMPLATE #include <vector> namespace odbclib { n ...

c++ Delegate

    博客分类:
  • c++
#ifndef DUMMYCLASS_H #define DUMMYCLASS_H namespace delegate { class DummyClass{}; } #endif   #ifndef METHODSTORAGE_H #define METHODSTORAGE_H #include "DummyClass.h" namespace delegate { class MethodStorage { public: typedef DummyClass GenericClass; ty ...

Nullable (bug)

    博客分类:
  • c++
  #ifndef NULLABLE_H #define NULLABLE_H #include "odbclib.h" namespace odbclib { template<typename T> class Nullable { typedef T const& const_reference; typedef T const* const_pointer; public: Nullable() :m_value(T()), m_isNull(true) { } Nullable(T ...
  void test1() { try { try { throw runtime_error("asdfasdf"); } catch(std::exception &e) { throw e; } } catch(std::runtime_error &e) { throw e; } catch(std::exception &e) { cout<<e.what()<<endl; } }   这段代码都有输出: ...
  #ifndef MEMORYBLOCK_H #define MEMORYBLOCK_H #include "odbclib.h" #include <cstdlib> using std::min; namespace odbclib { class MemoryBlock { public: typedef unsigned char byte; explicit MemoryBlock(size_t = 0xff) throw(runtime_error); MemoryBlock(MemoryBlo ...
构造函数中异常:   1.在无继承关系的前提下,构造函数中抛出异常未尝不可。 因为在对象没能构造完整的情况下,是不会去调用析构函数的。 2.在有继承关系的情况下,构造函数中抛出异常可能会引起问题   2.1如果基类中有纯虚函数,而且在基类的析构函数中有被调用的话,会得到一个 pure virtual function call的异常 2.2如果基类中有纯虚函数,但是基类的析构函数中没有被调用到,是没有关系的。   对2.1的猜想: 因为派生类构造函数在执行的时候,会先去调用基类的构造函数。所以如果异常产生于派生类,系统会认为基类已经构造完毕,但是这时因为派生类还没有构造完 ...
因为用了reflector,又过期了,结果把日期改为5月份,结果导致make的时候,一进行到产生依赖关系时,就死循环,google之:   http://kevinleo.blog.51cto.com/341461/583253 写道 今天闲着没事,新装了一台机器,在编译的时候MAKE一直出现死循环,搞的头都大了。经过一个小时的分析,我估计问题是出在系统时钟上。。。改完以后果然是这样,所以以后大家对系统时钟一定要千万注意,马虎不得。本文出自 “leiothrix相思鸟” 博客,请务必保留此出处http://kevinleo.blog.51cto.com/341461/583253
Global site tag (gtag.js) - Google Analytics