I'm rebuilding a old project on the new compiler, this includes Mmc_FAT (SPI1), SPI2, Soft I2C and UART on a 24FJ128GA010. I have got everything to compile except the Mmc.
Yesterday I noticed that the compiler threw numerous errors like this...
I had already included the Mmc_fat library but most of the errors seemed to be related to non-FAT Mmc functions, so I included that library too. This corrected all the errors and everything compiled. Is it always necessary to load the Mmc library with the Mmc_fat library?
This morning I loaded the license key and reran the compiler with exactly the same code and libraries and I'm getting these errors again...
???
ST.
More library antics (1.95beta)...
-
- Posts: 619
- Joined: 05 Jul 2008 06:05
- Location: Thailand
Re: More library antics (1.95beta)...
Hi,
Best Regards
islower and toupper are functions located in the C_Type library. Checking that in Library manager should resolve this error messages.Sobrietytest wrote: This morning I loaded the license key and reran the compiler with exactly the same code and libraries and I'm getting these errors again...
ST.
Best Regards
LibStock
http://www.libstock.com/
mikroSDK
https://www.mikroe.com/mikrosdk
mikroBUS
https://www.mikroe.com/mikrobus
http://www.libstock.com/
mikroSDK
https://www.mikroe.com/mikrosdk
mikroBUS
https://www.mikroe.com/mikrobus
-
- Posts: 619
- Joined: 05 Jul 2008 06:05
- Location: Thailand
Yes. The only difference is that the compiler will have to thumb through all the libraries to find the externals. The net result is the output will be the same - only the compiler will take a lot longer to do it. When people compare compilers, compilation speed is always a benchmark so I guess ME have to keep an eye on these metrics.If you check all libraries does the compiler optimise out anything that isn't required?
My example shows that you can choose a library (i.e. Mmc_fat) but that doesn't guarantee that it will work because it has dependencies in other libraries (i.e. C_Type). It would be nice if the dependent libraries were automatically selected when you pick your chosen library.
The problem is aggrevated because the 'Unresolved extern...' error doesn't indicate where the relevent external can be found - only the unit that's trying to call it. So you have two choices; you can either read through all the library functions to find the missing externals or go back and include all the libraries - which kind of defeats the point of having a Library Manager anyway!
So how about let the compiler try to compile while attempting to find any missing functions in all libraries and then automatically updating the library manager so that the next compilation will be quick.
Then on subsequent compilations if again any functions are missing look through the unchecked libraries and again automatically include any identified function libraries.
Then on subsequent compilations if again any functions are missing look through the unchecked libraries and again automatically include any identified function libraries.
I was thinking of a list of functions and a corresponding list of libraries. Something like:
Yes that is true that the compilation will be done more times until all necessary libraries will be ticked (this depends on how many unresolved externals the compiler reports on a compile). But this multi-step compiling is done only once, then after all used libraries are ticked, the compiling is done normally. I hope now my explanation is clear
Code: Select all
//Functions on first column, library on second.
ADC1_Init ADC
ADC1_Init_Advanced ADC
ADC1_Get_Sample ADC
ADC1_Read ADC
BitReverseComplex BitReverseComplex
Button Button
CANSPISetOperationMode CAN_SPI
. .
. .
. .
-
- Posts: 174
- Joined: 31 Aug 2009 22:44
All these problems would not exist if we (can) just
put the dependecies in the file itself, the C way.
That is, if a file uses functions from c_type, use
#include <c_type.h>
No need for special IDE functions to include libraries.
It also has the benefit that when you create a slightly
altered version (using another name) you know
which other libraries are used.
regards peter
put the dependecies in the file itself, the C way.
That is, if a file uses functions from c_type, use
#include <c_type.h>
No need for special IDE functions to include libraries.
It also has the benefit that when you create a slightly
altered version (using another name) you know
which other libraries are used.
regards peter
Hi,
On other note one simple and quick way to check the correct library is to select, in this case, islower which is already highlighted in red, with cursor then hit F1 and the appropriate library page will open, that can give you a hint which library to check.
Best Regards
We will consider this and ways to implement it, or modify error messages so they are more clear on what to do to solve that error.would it be hard to implement a mechanism that parses the error message to extract the unresolved function name and based on that to automatically check the corresponding library from Library Manager ?
On other note one simple and quick way to check the correct library is to select, in this case, islower which is already highlighted in red, with cursor then hit F1 and the appropriate library page will open, that can give you a hint which library to check.
Actually if you select MMC there is no need for C_Type to bi included, however if you select MMC_FAT16 C_Type library will be checked.My example shows that you can choose a library (i.e. Mmc_fat) but that doesn't guarantee that it will work because it has dependencies in other libraries (i.e. C_Type). It would be nice if the dependent libraries were automatically selected when you pick your chosen library.
Search for LibDependency.ini file in the compilers folder there you will find settings for library dependencies, but remember to make a backup copy of it before editing just in case.All these problems would not exist if we (can) just
put the dependecies in the file itself, the C way.
That is, if a file uses functions from c_type, use
#include <c_type.h>
Best Regards
LibStock
http://www.libstock.com/
mikroSDK
https://www.mikroe.com/mikrosdk
mikroBUS
https://www.mikroe.com/mikrobus
http://www.libstock.com/
mikroSDK
https://www.mikroe.com/mikrosdk
mikroBUS
https://www.mikroe.com/mikrobus
Thank youmarko.ziv wrote:Hi,We will consider this and ways to implement it, or modify error messages so they are more clear on what to do to solve that error.would it be hard to implement a mechanism that parses the error message to extract the unresolved function name and based on that to automatically check the corresponding library from Library Manager ?
-
- Posts: 2780
- Joined: 25 Dec 2008 15:22
- Location: Scotland
you can also view the tree in the compiler help filemarko.ziv wrote:Hi,
Search for LibDependency.ini file in the compilers folder there you will find settings for library dependencies, but remember to make a backup copy of it before editing just in case.
F1, search with "Library Dependencies" to view the tree.