Disclaimer: I just made by hello world with gmcs
yesterday
Problem
I want to use fastJSON in my project using gmcs.
How do I
- compile the project, consisting of 10 or so files into a library?
- statically link against that library with my 1-file project?
- "install" the library on my system?
Imagined Solution
cd ~/fastJSON
gmcs --blahblah=fastJSON.csproj
cd ~/myProject
gmcs --yadayada=static ~/fastJSON/fastJSON.lib main.cs
The easiest solution is to use xbuild to build the fastJSON project:
This will build a library (.dll) somewhere (typically in the bin/Debug subdirectory, but it can be changed in the project file so it may be somewhere else for fastJSON).
Now you have the library, and you reference it like this when compiling your code:
You don't need to install the fastJSON library on your system, just put it next to your executable.