Makefile

Please provide an example of a Makefile to compile C++ source files that contain Root.
This example should be displayed very visibly in the Root homepage.
Presently I spend a lot of time to search long manuals and the entire forum to find information for such a basic thing.

1 Like

Better than a Makefile, a CMakeLists.txt file
root.cern.ch/how/integrate-root … ject-cmake
Pere

find ${ROOTSYS}/test -name “[Mm]ake

Honestly, none of your answers are useful.

  1. Why should I use cmake? How is it better than a makefile? Does it retain the same functionality as a makefile? What if I wanted to build a shared library?
  2. What hides behind the cryptic

Where to find?

Hi,

Here is a simple example: Linking ROOT Libraries to a MakeFile install

Cheers, Axel.

Information about what flags and where to use should be displayed very prominently in the Root homepage (so that the user does not spend hours looking for them) and not the abyss of a forum.

Hi,

It would be hidden in the abyss of our web site :slight_smile:

We also recommend not to build your own binary; the default mode with working with ROOT should be to start it and use it, instead of having to fight things like compilation flags, missing symbols and the event loop concept (“where are my windows?!”). That’s the result of 20 years of combined (i.e. not just my personal) experience with developing and using ROOT. It explains why we don’t want to display this prominently - it would be wasting lots of time for many of our users.

That CMake / Makefile thing is IMHO a pity; it’s mostly a question of personal preference, but it explains why much of the Makefile info we used to have has been removed recently.

Cheers, Axel.

This is completely opposite how I prefer to work.

  1. In practice, I need to build a complex software - impossible to do in Cling
  2. Using g++ is more comfortable than Cling

Hi,

I reckon you’re not our average user! :slight_smile:

I do understand your point, but then the reaction is “use CMake”… (not my personal view, I prefer Makefiles for simplicity, but hey.)

Axel.