Grumpy_Mike No the one I ran was compiled as a result of the make process when installing the library.
That is: you managed to build it.
Grumpy_Mike eany editor and set the document type to C++. Then I loaded in the general-print.cpp file from the examples/general-print folder and chose the compile option from the Build menu.
Right, so you have an issue with the build system provided by the Geany editor.
Grumpy_Mike I interpreted this as meaning either the libraries have not been put in the correct place,
When you download the repo, the files are within the Trill-Linux
folder. None of these files is installed in a special place on your system. A program using this library needs to:
- have the
Trill-Linux/lib
folder included among the folders to search for .h
headers
- build the
Trill-Linux/lib/Trill.cpp
file as part of the program
The provided Trill-Linux/examples/Makefile
does just that for all the folders in Trill-Linux/examples
, so one easy way to add a new program is to create another subfolder in there, e.g.: Trill-Linux/examples/myproject
, with one or more .cpp
files in there, e.g.: Trill-Linux/examples/myproject/myproject.cpp
and then run make
again. This will build your new project.
The alternative, which is the more generic approach, is to somehow instruct your build systems to perform steps 1. and 2. above. I am not familiar with Geany, so I will try to give generic instructions.
Step 1. is normally accomplished by passing to the compiler the option -I/path/to/Trill-Linux/lib
.
Step 2. is a bit more complicated. If the building system does compiling and linking in one stage, it would be sufficient to add /path/to/Trill-Linux/lib/Trill.cpp
to the build line. Otherwise, you may have to add that file as a dependency. Again, I don't know Geany and I don't know if it is capable of handling multi-file programs.
You can always build your program from the command line (or instruct Geany to do so if possible) by running
g++ /path/to/your/file.cpp /path/to/Trill-Linux/lib/Trill.cpp -I /path/to?Trill-Linux/lib -o /path/to/binaryoutputfile
Grumpy_Mike As this is my first time using Geany I tried a Hello World example where I had to pull in external libraries and that worked fine
what process did you use to "pull in external libraries"? That may give some insights on how to do the above. However, if it was using shared libraries, the process would be somewhat different here.