B4R Question [Will be solved in the next version] Strange behaviour when changing module names: Compiler still looks for the *.cpp files

KMatle

Expert
Licensed User
Longtime User
I guess it's a stupid error I make but I don't get it. I renamed one module twice and had to edit all references (OK). Now I get compiler errors.

"dobase64" and "base64methods" were the two OLD names of the code module. I even deleted those manually from the folders but the compiler still throws errors. I even did a file search hoping to find any references but I didn't.

Any ideas?

B4X:
C:\Users\klaus\Documents\B4RApps\UDPAES256_Working_optimized\B4R_UDP_V2_Display\Objects\src\b4r_dobase64.cpp:50:1: error: 'b4r_dobase64' has not been declared

B4X:
C:\Users\klaus\Documents\B4RApps\UDPAES256_Working_optimized\B4R_UDP_V2_Display\Objects\src\b4r_base64methods.cpp:3:21: error: 'b4r_base64methods' has not been declared
 

RJB

Active Member
Licensed User
Longtime User
I've had similar problems. I think it's because it doesn't re-compile and uses previously compiled files.
Have you tried cleaning the project?
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Yup. But doesn't work. I assume that something has changed with the new Arduino version and B4R doesn't get all folders.

When I delete the Arduino temp folders under C:\Users\klaus\AppData\Local\Temp manually all is good.

Will post a bug report
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Any ideas?
have you checked the *.B4R-File with Notepad++ to see if there are references which should not be there?
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
@DonManfred

One can reproduce the behaviour with a new project (main plus additional code module):

The code module ist called "FirstGivenName"

FirstCompile.png


After the first compile I renamed it:

1708448969463.png


I clicked on "Clean project" and did a new compile:

AfterRename.png


*.b4r file:

B4X:
Build1=Default,B4RDev
Group=Default Group
Library1=rcore
Module1=[B]AfterRename[/B]
NumberOfFiles=0
NumberOfLibraries=1
NumberOfModules=1
Version=4
@EndOfDesignText@

#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 600
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src

Sub Process_Globals
    Public Serial1 As Serial
    
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
    AfterRename.TestSub
End Sub

I still need to manually delete the corresponding temp files to get all things right
 
Upvote 0
Top