Re: uBITX Code Compilation Problem

Jack, W8TEE


It is possible to still get errors even if you have all of the proper source code files in the right project directory. My experience is that some people don't install the proper library files in the right directories or they use the "<>" and double-quoted header file directives incorrectly. Unfortunately, the actual error message displayed varies according to the exact nature of the error, so it's difficult to summarize.

While this is a simplification, it may help some understand the process. When you use a standard library function (e.g., Serial.print(), delay(), pinMode(), etc.), the source code for those functions is not in your project directory. Because the compiler doesn't see the code for these standard functions, it leaves question marks after the function name at the point where those functions' code should be placed. When the compiler is done, it automatically loads another program called a Linker. It's the Linker's responsibility to plug those holes in the program where the question marks are. If you surround the library name in double quotes:

    #include "MyLibrary.h"

the Linker looks in the current project directory for the missing library code (i.e., probably MyLibrary.cpp). If the Linker still can't find the library code, it will search the default library path (e.g., C:\Arduino1.8.10\libraries) for the missing code. If you use angle brackets on the library file:

   #include <MyLibrary.h>

the Linker only looks in the default library path. So, double-quotes searches the project directory for the missing code and, if not found, it searches the default library path. If you use angle brackets, it only searches the default library path, not the project directory.

Anyway, you need to have both your project's code and any called libraries in their expected places or you will get an error message.

Jack, W8TEE

On Friday, October 18, 2019, 10:38:51 AM EDT, Mark - N7EKU <n7eku@...> wrote:

Hi Adrian,

When you unzip the original files, there will be an .ino file named for the code version.  You need to make a folder with the exact same name (except the .ino part) and put all the files into that folder.  Then it should compile fine.  The IDE only looks for the needed files in a folder with the same name as the code.



Jack, W8TEE

Join to automatically receive all group messages.