简单编写makefile文件,实现GCC4.9编译项目,加入boost库测试等等。。

本文介绍了如何编写一个简单的Makefile,以便在Linux环境下用GCC4.9编译C++11项目,并结合Boost库进行测试。通过示例展示了Makefile的清理、编译、链接等命令及其具体用法。
摘要由CSDN通过智能技术生成

一、需要用到的hw.cpp hw.h funtest.cpp funtest.h makefile 几个测试文件

1、hw.cpp代码如下:

#include "hw.h"
#include "funtest.h"
using namespace std;
using namespace boost;
int main()
{
  timer t; 
   {
     int i=1;
   }
   auto i="abc";
   cout<<i<<endl;
   cout<<"endl"<<endl;
   cout<<"abcdefj"<<endl;
   cout << "最大处理时间:" << t.elapsed_max() / 3600 << " h" << endl;  
   cout << "最小处理时间:" << t.elapsed_min() << " s" << endl;  
   cout << "逝去时间:" << t.elapsed() << " s" << endl;  
   cout<<"每行需要一个tab键"<<endl;
   funtest::testa test1;
   test1.testafun();
}

2、hw.h代码如下:

#ifndef __HW_H__
#define __HW_H__
#include <iostream>
#include <boost/timer.hpp>
#include <boost/pro
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值