完美编译运行PCRE on Windows , Solved the __imp__pcre_exec __imp__pcre_compile __imp__pcre_free Errors

在Windows上编译PCRE时遇到__imp__pcre_exec等错误,通过在Pcre.cpp中定义PCRE_STATIC并在包含pcre.h之前解决链接问题。成功编译并运行。
摘要由CSDN通过智能技术生成
写写英文吧,好长时间不写都有点不熟练了when I compile the following codes which test the pcre , I got the unreferenced error __imp__pcre_exec __imp__pcre_compile __imp__pcre_free Errors, my Codes are follows:
//packing pcre usual functions.

#ifndef _PCRE_H_
#define _PCRE_H_
#include <pcre.h>
#include <string>
#include <vector>
#include <string.h>
using namespace std;

const int VECSIZE = 30;

struct MatchResult
{
	string name;
	vector<string> value;
};

class Pcre
{
public:
	Pcre();
	~Pcre();

	//Add a regrex, pass in name and regrex
	int AddRule(const string &name, const string &patten);

	//clear all the regrex
	void ClearRules();

	//match all the regrex, also return all the string match to every regrex
	vector<MatchResult> MatchAllRule(const char content[]);

private:
	const char *error;
	int erroffset;
	int ovector[VECSIZE];
	vector<pcre*> re_arr
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值