使用g ++编译包含根库的c ++ [英] Compiling a c++ including root libraries with g++

查看:130
本文介绍了使用g ++编译包含根库的c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用g ++编译器编译一个使用ROOT框架的TF1库的c ++程序.

I am trying to compile a c++ program, which uses the TF1 library of the ROOT-framework, with the g++ compiler.

我尝试了

我已经尝试过

g++ a.cpp -o 'root-config --cflags --glibs' 

但这只是给我一个错误

g++: error: no such file or directory: 'root-config --cflags --glibs'

我对ROOT和C ++都非常陌生,非常感谢您的帮助!

I am very new to both ROOT and C++ so help is very mucha appreciated!

推荐答案

您必须检查:

g++ a.cpp $(root-config --cflags --glibs) -o a 

这篇关于使用g ++编译包含根库的c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆