![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
qry
这个作者很懒,什么都没留下…
展开
-
在MSYS下用MingW GCC编译libgmp的一个小问题及解决方法
昨天在Msys下用MingW GCC 4.7.0编译libgmp时遇到一个问题,说找不到"m4 gcc"这个文件。其实一看就知道这是两个不同的文件,错误是由libtool报出的,因此很可能是libtool脚本写的有问题,或是Windows环境下脚本的解释有问题。最终查到问题涉及的直接文件是mpn/Makefile,修改其1023行(libgmp版本5.0.4)原行:$(LIBTOOL) -原创 2012-02-12 13:49:42 · 1158 阅读 · 0 评论 -
BCB 应用TRegistry读取Python目录
AnsiString KeyName, ver, s; KeyName = "\\SOFTWARE\\Python\\PythonCore"; TRegistry *Registry = new TRegistry(KEY_READ); TStringList *ps = new TStringList(); try { Registry->RootKey = HKEY原创 2012-03-19 13:51:11 · 935 阅读 · 0 评论 -
使用BCB6-TValueListEditor控件
TValueListEditor控件可实现类似属性选择窗口的功能。当然相比至下功能还是少了很多,不过很多情况下也够用了。通过重载类函数及控制控件消息响应的方式,打造一个自己满意的控件那不是当下我想做的事。在此记录该控件的简单使用方法1. 添加key->Value对ValueListEditor1->InsertRow("name", "value", true);参数:true ->转载 2012-03-10 14:28:57 · 1342 阅读 · 0 评论 -
使用tcc编译器
TCC是纯C编译器,支持C99标准,有些独到特点。1. TCC的主页(已停止开发)2. 编译TCCgcc -O2 -shared -Wall -Wl,--export-all-symbols -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -fno-strict-aliasing -DTCC_TARGET_P原创 2012-02-27 10:50:31 · 5564 阅读 · 0 评论 -
一段调用advapi32.dll中MD5函数的BCB代码
#ifndef TOOL_BOX#define TOOL_BOXextern "C"{/* Data structure for MD5 (Message-Digest) computation */typedef struct { unsigned long i[2]; /* number of _bits_ handled mod 2^64 */ unsigned l转载 2012-03-07 22:01:17 · 1005 阅读 · 0 评论 -
C++ 内嵌 python 例程
#include intmain(int argc, char *argv[]){ PyObject *pName, *pModule, *pDict, *pFunc; //所有针对python的输入输出对象 PyObject *pArgs, *pValue; int i; if (argc < 3) { fprintf(stderr,"U转载 2012-03-06 17:37:15 · 577 阅读 · 0 评论 -
Base64编解代码
AnsiString DecodeBase64(AnsiString Source) { byte x1,x2,x3,x4,xt; int SrcLen,Times,i; AnsiString Result; Result= " "; SrcLen=Source.Length(); Times=SrcLen /转载 2012-03-04 13:31:04 · 484 阅读 · 0 评论 -
C++ 嵌入 Lua 脚本 示例代码
// lua.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include #include //lua头文件extern "C" //在c++中调用C库{#include #include #i转载 2012-02-25 14:35:21 · 1493 阅读 · 0 评论 -
BCB6 使用线程对象
不废话,贴代码1. 线程对象//---------------------------------------------------------------------------#ifndef Unit2H#define Unit2H//-----------------------------------------------------------------------转载 2012-03-04 13:13:50 · 895 阅读 · 1 评论 -
BCB6 listView使用的几个技巧
1. 写入数据 CppSQLite3DB db; db.open("test.db"); CppSQLite3Query q = db.execQuery("select * from db.tablename"); ListView1->Items->BeginUpdate(); while(! q.eof()){ TListItem原创 2012-03-03 15:07:41 · 3984 阅读 · 0 评论 -
BCB6 控件对象枚举
for(int i = 0; i ControlCount; i++){ TControl *pctrl = GroupBox1->Controls[i]; int tag = pctrl->Tag; if(pctrl->ClassNameIs("TComboBox"))原创 2012-03-03 21:35:24 · 496 阅读 · 0 评论 -
Openmp在暴力猜测MD5源字串一例
//gcc -fopenmp -O2 -static -s omp_pwd_md5.c md5.c -o omp_pwd_md5.exe#include #include "md5.h"#include #define PASSWD_MAXLEN 32#define PASSWD_SET_SIZE 36const char *passwd_words = "0123456789abc原创 2012-03-03 21:27:04 · 626 阅读 · 0 评论 -
调用mpfr的一段示例(极不完整)
char buffer[2048]; mp_exp_t e; unsigned int i; mpfr_t s, t, u; mpfr_init2 (t, 200); mpfr_set_d (t, 1.0, GMP_RNDD); mpfr_init2 (s, 200); mpfr_set_d (s, 1.0, GMP_RNDD); mpfr_init2 (u,转载 2012-02-25 22:06:34 · 6802 阅读 · 0 评论 -
Stdcall and DLL tools of MSVC and MinGW
Stdcall and DLL tools of MSVC and MinGWThe __stdcall calling convention has been there for a very long time. When the older calling conventions like __pascal fell into oblivion, __stdcallbecame转载 2012-02-26 15:58:45 · 621 阅读 · 0 评论 -
一段为图像处理做准备的BCB代码
Graphics::TBitmap *pb = Image1->Picture->Bitmap; int img_H = pb->Height; int img_W= pb->Width; Graphics::TBitmap *pc = new Graphics::TBitmap; pc->PixelFormat = pf24bit; pc->Width原创 2012-02-25 14:23:43 · 729 阅读 · 0 评论 -
CppSqlite Demo
////////////////////////////////////////////////////////////////////////////////// CppSQLite3 - A C++ wrapper around the SQLite3 embedded database library.//// Copyright (c) 2004..2007 Rob Groves.转载 2012-02-25 14:32:45 · 851 阅读 · 0 评论 -
smartsniff用到的pcap接口函数
pcap_findalldevs_expcap_freealldevspcap_openpcap_closepcap_next_expcap_looppcap_compilepcap_setfilterpcap_freecodepcap_nextpcap_findalldevspcap_open_livepcap_open_offlinepcap原创 2015-01-11 21:19:41 · 694 阅读 · 0 评论