Noob question so sorry in advance. Importing libraries?

Alright this will sound silly to you guys but google so far has failed me.

I’m learning how to program in swift for an internship and using Remobjects (silver) to practice at home (Visual studio 2015)since I don’t own a macbook/imac.

I can’t figure out how to import libraries. Obviously without stuff like “import Foundation” I’m not getting very far.

I’ve downloaded the relevant libraries from Github and unzipped. However it seems like no matter what I do NuGet can’t find it. I’ve tried referencing the file directly but I can’t find any .dll/.exe’s

I’m sorry to waste time here with what I’m sure is a silly question. However I would be grateful is somebody could quickly point me in the right direction here.

Kind regards,
tris

I hope I’ve understood your problem correctly in which case, if you don’t own a Mac of any flavour then you won’t be able to run anything that uses Foundation since that’s an Apple framework for their devices and OS’s.

Elements Silver enables you to use the Swift language, but you still need a Mac if you want to build Swift programs that run on Apple devices. Otherwise you can still use Swift but will have to develop .net or x86 applications (or Android/Java), in which case you need to reference different frameworks. i.e. those applicable to those platforms.

ok that explains a lot. Thank you.

quick follow up, do you know if there a .net equivalent of the foundation library. Something that gives me the basic functionality so I can at least do some practice exercises?

There isn’t really a 1:1 correlation across the different platform frameworks. The closest on .net to the Foundation library is probably the System namespace. To be honest, I haven’t done much Swift/Silver with Elements - I favor Oxygene - but if Silver on .net is at all like Oxygene (or C# etc) then the System namespace is used implicitly.

i.e. you may not need to explicitly import it at all.

The simplest way to get started would be to use one of the template projects which should scaffold everything you need. So for example a Silver .net Console project should be enough to provide a starter project for any exercises involving creating programs that take input from and send output to a console.

1 Like