Mac - Compile for C (Not C++)

KaRo,

I am not interested in the command line tool.

As I mentioned, I work in C and was intending to analyze a couple of the algorithms in gmic, and assess things as they are.

On the mac, the installation via both homebrew and macports failed. I don’t know what you mean that “they are already compiled and don’t take long” - for example, the heavy ones, llvm and clang, and all of the 341 are downloaded and compiled when calling the macports install gmic command, and this takes hours. - not to mention that I would not want these installed on our computers, and that they require individual patching on the latest Mac OS with new hardware. It has been clearly communicated that using the Mac is not supported, and I have moved on.

On linux, there are dependency and/or linking problems for both C++ and C. The information in the documentation about both installing and using the library even for linux is incorrect and I was not able to compile the example code.

Ok, I misunderstood you. Excuse my rude expression.

Still, I don’t understand why you try to compile gmic, which is, even under C or C++, only a different way to call gmic scripts or command pipes. I think you should better use the CImg header file. In the case of CImg there is the problem of dependencies completely in the hand of the programmer.

That you have even with linux problems is quite interesting, possibly some specialities on your computer? I ask me how @Carmelo_DrRaw is managing the mentioned disaster on Mac. Or, what is with my machine not having similar problems?

Concerning MacPorts “compiled binaries”: If you install MAcPort there are at least two possibilities, either from source or binary, I have called it the quick way. I have now followed several OS versions, hardware don’t matter so much, in fact I had sometimes to reinstall MacPort. Still it was for me a more versatile tool compared to homebrew.

Ok, you have moved on. In fact I have already made my way from Unix to Windows to linux and finally to MacOS. And there were enough reasons to “move on”! Good luck for new experiences!

Do you mean to say that none of gmic is written in C++, and that the C++ api is merely a wrapper that executes low-brow scripting languages?

My main intent here is merely to assess gmic/cimg in it’s natural habitat from a code-centered perspective (non-gui and non-command line)

So when I said I am moving on, it was merely in response to David’s communication that he does not support Mac. So I moved on to say ok, let’s install a fresh copy of linux and follow the website - and then it still failed with very similar dependency/linking compiler errors that I saw on the Mac.

If David or someone else can help describe the exact OS choice, and a specific list of working instructions for all the steps to install from a blank state, then I will follow them to the letter and continue the assessment.

It is very clear that the website documentation has been neglected as the very first line it tells you to run, is wrong.

I believe it also assumes that I will perform various actions that are not listed.

Unfortunately, I come from a mission critical work environment where the standard of quality is different (even something like libpng is banned for being unacceptable and we don’t use dependencies like this). Because of this, I have no clue how to go about doing these undocumented actions to fix the dependencies and linking errors.

If someone can spoon feed me the hacks I should do to install and compile on any version of OS, I will follow the instructions.

My main goal is foremost to survey the landscape of gmic/cimg and assess it objectively without rose colored glasses. We will then use the assessment to take (or not take) immediate actions this month.

No, gmic is written in C++, still it is mainly the script language and the mathematical script interpreter and some data input/output plus the hundreds of scripts. As far as I know the C and C++ API allows to load images (data) and process scripts or pipes and to return result data! Thats the reason that I recommend CImg which is in my opinion the underlayed processing part, besides a lot of logic to allow multi-processor computing in gmic resp. in the gmic plugin.

You mentioned a fresh installation of linux, by no means you have used a fresh MacOS in your trial. It is true that MacOS resists a bit in usage of open software and the package managers (MacPorts, homebrew) are only an aid to overcome problems. A fresh MacOS is not so resistant agains package managers.