Recent

Author Topic: Lazarus IDE sees my code changes but fpc dont.  (Read 5320 times)

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Lazarus IDE sees my code changes but fpc dont.
« on: September 21, 2018, 11:02:18 pm »
I installed Lazarus 1.8.4 using fpcupdeluxe in a debian based machine. Then I installed the lclvcl package. Then I edited some code (inside fpcsrc/packages/libvlc) and I am able to ctrl+LeftClick identifiers to explore such code. However, I am getting an "identifier idents no member"  from the compiler. What am I missing here?? Why the compiler is not seeing my code changes?
« Last Edit: September 22, 2018, 12:57:16 am by cpicanco »
Be mindful and excellent with each other.
https://github.com/cpicanco/

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #1 on: September 21, 2018, 11:05:52 pm »

What about "Run" --> "Clean up and Build" ?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #2 on: September 21, 2018, 11:16:05 pm »
Quote
What about "Run" --> "Clean up and Build" ?
It does not work :(
Be mindful and excellent with each other.
https://github.com/cpicanco/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #3 on: September 21, 2018, 11:31:44 pm »
Everything under fpcsrc is not managed by Lazarus, as it's part of FPC (i.e. other than FCL, there's no Lazarus package for other FPC packages). If you make changes there, rebuild and install the package using the provided Makefile, overwriting existing compiled files for respective units.

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #4 on: September 21, 2018, 11:35:31 pm »
Everything under fpcsrc is not managed by Lazarus, as it's part of FPC (i.e. other than FCL, there's no Lazarus package for other FPC packages). If you make changes there, rebuild and install the package using the provided Makefile, overwriting existing compiled files for respective units.

So, just for the sake of organization, what would be the safest way to track those changes? Copying them to the projects' folder?
Be mindful and excellent with each other.
https://github.com/cpicanco/

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #5 on: September 22, 2018, 12:54:59 am »
Humm... I think I am doing something really wrong:

Quote
$~/lazarus/stable/fpcsrc/packages/libvlc$ make
./fpmake compile --localunitdir=../.. --globalunitdir=.. --os=linux --cpu=x86_64 -o -Cg -o -dx86_64 --compiler=~/lazarus/stable/fpc/bin/x86_64-linux/ppcx64 -bu
The installer encountered the following error:
Could not find unit directory for dependency package "rtl"
Makefile:2362: recipe for target 'all' failed
make: *** [all] Error 1

Things I have tried:

1) adding export FPCDIR=~/lazarus/stable/fpc/lib/fpc/3.0.4 to my .bashrc

2) linking fpc.sh to /usr/local/lib and including fpcupdeluxe fpc.cfg in my $HOME/.fpc.cfg (as mentioned here https://github.com/castle-engine/castle-engine/wiki/fpcupdeluxe)

Please guys, I need some light to compile this code.


Be mindful and excellent with each other.
https://github.com/cpicanco/

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #6 on: September 22, 2018, 05:44:44 am »
Normally, if you make changes into the FPC sources, you need to rebuild FPC itself.
Fpcupdeluxe makes this easy.

In setup+, just check the "rebuild only" checkbox.
And click the FPC button in the main screen.
Fpcupdeluxe will rebuild FPC without updating the sources !

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #7 on: September 22, 2018, 01:53:45 pm »
Thank you Don Alfredo. I will be testing this approach. I am receiving an error (and I am guessing the problem is with my code):
Quote
fpcupdeluxe: info: FPC builder: Detected source version FPC: 3.0.4
fpcupdeluxe: info: FPC builder: Using FPC bootstrap compiler with version: 3.0.2
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: FPCNativeInstaller (BuildModuleCustom: FPC): Error running make for FPC failed with exit code 512

I have the felling that I should not be doing fpcsrc changes at all.
Be mindful and excellent with each other.
https://github.com/cpicanco/

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #8 on: September 22, 2018, 02:01:13 pm »
I mean, you said "normally", not "always" or "must". May I ask if you have some alternative approach in mind :D ??
Be mindful and excellent with each other.
https://github.com/cpicanco/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #9 on: September 22, 2018, 11:36:35 pm »
Humm... I think I am doing something really wrong:
Build the RTL one first, or just build everything (but install only what you've changed and what depends on it).

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Lazarus IDE sees my code changes but fpc dont.
« Reply #10 on: September 23, 2018, 02:52:42 pm »
Just want to say I was not able to make this happen. However I found PasLibVlc and it is doing the work.

Best.
Be mindful and excellent with each other.
https://github.com/cpicanco/

 

TinyPortal © 2005-2018