Proper way of using Sugar in Solutions


Maybe dumb question, but se la vi)

What is propery way of using Sugar in my, for ex, OSX console application?

As i can understand, i should start empty solution using OSX console template. Then i should add Sugar solution via Add existing project. What part of Sugar i should add? Should i add whole Sugar.oxygene solution (including Nougat.* and Legacy projects) or i can choose only .Nougat.OSX project?

Then, i should add reference to my project - via Add reference - Solutions - And add Sugar.OSX?

Then in my units i should add in uses section - what? RemObjects.Oxygene.Sugar ?

Am i correct, or i completely miss some basic things? Any documentation or link?))

Ookk… Continuing investigation.

I have test project and a solution called OxyTest, and i need Console class from Console.pas.

So, i m adding new existing project to my solution - RemObjects.Oxygene.Sugar.Nougat.OSX. Ok. Building THIS project, and I have libSugar in bin\release\OSX

Then i switch Project (set as Startup project? or i miss something from VS?) to my OxyTest. Then i add Reference, select Solution group, and select RemObjects.Oxygene.Sugar.Nougat.OSX.

Does not work: it looks for Projects\Sugar\Sugar\bin\Release\Sugar.a, but we have only libSugar.a, and at different location.

So only way to sort this out is to Add reference, then select Browse, then - add libSugar.fx as a reference point!

Did i miss something?

you should not use Sugar as project at all, you should just build Sugar via its own project/solution and reference the .fx.

as for the Legacy project, thats rather empty still, and meant for the Delphi-like APIs. for now i recommend focusing on the core Sugar library.

it might be that “project references” are still broken for Nougat (will test and log). for now id recommend against using them and just building Sugar separately. (you can have two copies of VS open, if you want to work on and extend Sugar, as you also use it in the other project — that’s what i do)

bugs://59884: Nougat: project references don’t use lib* prefix properly