Topics

uBITX Code Compilation Problem

Adrian Rees (MW1LCR) <mw1lcr@...>
 

Hi all

I am trying to compile the uBITX v5.1 code and i am getting compilation errors.

I managed to sort out all except one...

the error I get is:

exit status 1
'checkCAT' was not declared in this scope

I checked that the {} brackets where correct and they seem to be OK. I am using Arduino v 1.8.10

Can some body help ?

Thanks

Adrian M1LCR



 

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.

73,


Mark.

Jack, W8TEE
 

Mark:

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.

73,


Mark.

--
Jack, W8TEE

 

Yeah for sure,

However it sounds like he is just trying to compile the orginal code, so all that is required should be in Farhan's zipped package on github.  Also, the error message is the exact same that I got when I didn't have these files placed correctly.

73,


Mark.

MVS Sarma
 

I use older version ide  1.8.5.
 it does compile without issues.
 latest versions , i have issues  with my laptop working win7 64bit.


On Sat, Oct 19, 2019 at 8:30 AM Mark - N7EKU <n7eku@...> wrote:
Yeah for sure,

However it sounds like he is just trying to compile the orginal code, so all that is required should be in Farhan's zipped package on github.  Also, the error message is the exact same that I got when I didn't have these files placed correctly.

73,


Mark.

Adrian Rees
 

Mark, Jack
Thank you for the emails. I'll try a few things this weekend and see how I get along.

Thanks again.

Adrian M1LCR

On 18/10/2019 16:34, Jack, W8TEE via Groups.Io wrote:
Mark:

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.

73,


Mark.

--
Jack, W8TEE