简体   繁体   English

在Windows中使用Makefile构建C ++程序

[英]build a c++ program with makefile in windows

I wrote a little c++ program with visual studio. 我用Visual Studio编写了一个小c ++程序。 I have to build that program with a shell script. 我必须使用shell脚本来构建该程序。 For that I installed cygwin. 为此,我安装了cygwin。 How can I build a program, that uses an environment variable for the boost-library? 如何构建将环境变量用于boost-library的程序?

  1. Install boost from http://www.boost.org/users/download/ http://www.boost.org/users/download/安装boost
  2. I'm not sure of the system that you use to compile C++ but thing is for sure, you need to create a makefile for your program. 我不确定您用于编译C ++的系统,但是可以肯定的是,您需要为程序创建一个makefile
  3. After makefile is created, add to the flags the following: 创建makefile之后,将以下内容添加到标志中:

    -lboost_system -lboost_locale -lboost_system -lboost_locale

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM