Adding Units to FPC from GitHub lazarus / 62-General ---------------------------------------------------------------------- Mark92630 · 2015-03-30 16:59 Mac OS X 10.10 (Yosemite), with fpc (2.6.4), fpcsrc, and Lazarus (1.2.6) installed. I have not been using Lazarus, because the learning curve with Lightweight-IDE looks a LOT less steep. Anyway, I've been writing some elementary programs in fpc (using Lightweight-IDE), and they mostly work just fine. Now, I want to add some code from GitHub to my existing Pascal environment, namely "generics.collections" from "dathox", and I have no idea how to do it. There are no installation instructions for this on GitHub. Can anyone help? TIA, Mark ---------------------------------------------------------------------- Leledumbo · 2015-03-30 17:02 Start here: http://www.freepascal.org/docs- html/user/userch3.html#x18-250003 ---------------------------------------------------------------------- skalogryz · 2015-03-30 17:05 You'll need to install trunk version of FPC for that. Then get the files on your harddrive. make sure fpc has the search path set up to (-Fu%thepathwherefilesare%) the added generics.collections to your uses section Code: [Select]uses ... generics.collections ---------------------------------------------------------------------- Mark92630 · 2015-03-30 17:39 So, now I have multiple questions, but I will take them one at a time. When I start fpc from the command line, why am I getting ppc386 and not ppcx64? Here are the first three lines back from typing "fpc" (without the quotes) at the command prompt, and hitting [enter]. Free Pascal Compiler version 2.6.4 [2014/02/26] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others /usr/local/bin/ppc386 [options] [options] Thanks, Mark ---------------------------------------------------------------------- skalogryz · 2015-03-30 18:27 that's because i386 is a default target (selected by "fpc") for OSX. passing -Px86_64 to fpc will make it select ppcx64. ---------------------------------------------------------------------- Mark92630 · 2015-03-31 00:46 Thanks. Next question, when I look at compiling units as described in the documentation: http://www.freepascal.org/docs-html/user/userse11.html#x27-340003.3 it refers to .pp files. But "generics.collections" has a /src folder with a bunch of .pas files and a sub-folder /src/inc, with a couple of .inc files. I tried to feed a .pas file to fpc, but it complained that the file contained an "Illegal unit name: Generics". Is this where I need a Version 3 compiler? ---------------------------------------------------------------------- skalogryz · 2015-03-31 01:45 Quote from: Mark92630 on March 31, 2015, 02:46:15 amIs this where I need a Version 3 compiler? Yes, this is the where you need Version 3 compiler.