Recent

Author Topic: [SOLVED] DEBUGSTART_$CUSTINFOUNIT  (Read 3949 times)

WickedDum

  • Full Member
  • ***
  • Posts: 211
[SOLVED] DEBUGSTART_$CUSTINFOUNIT
« on: October 01, 2016, 11:20:31 pm »
The custinfo.lpr file:

Code: Pascal  [Select][+][-]
  1. program CustInfo;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  7.   cthreads,
  8.   {$ENDIF}{$ENDIF}
  9.   Interfaces, // this includes the LCL widgetset
  10.   Forms,
  11.   { you can add units after this } CustInfoUnit;
  12.  
  13. {$R *.res}
  14.  
  15. begin
  16.   RequireDerivedFormResource:=True;
  17.   Application.Initialize;
  18.   Application.CreateForm(TForm1, Form1);
  19.   Application.Run;
  20. end.

The 'end.' was highlighted.

I used CustInfo as the unit name before.  Then I received the error "DUPLICATE IDENTIFIER".  The only way I resolved that error was to rename the unit.

What do I do know??  :-[

Thanks, in advance!
« Last Edit: October 03, 2016, 08:59:39 pm by WickedDum »
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: DEBUGSTART_$CUSTINFOUNIT
« Reply #1 on: October 02, 2016, 01:48:11 am »
Not sure, but when you get linker errors, make sure you have no duplicate ppu or .o files.

check your lib folder.
check the lib folder of packages used.

make sure you do not have any other directories included (unit search or lib search....)

WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: DEBUGSTART_$CUSTINFOUNIT
« Reply #2 on: October 02, 2016, 09:49:54 am »
Thank you!

@Martin_fr - In the lib directory, there are no duplicate files.  If you mean duplicate files between the lib directory and the project directory, there are two files:  custinfo.lfm and custinfo.res.  The project directory files are date-stamped 10/1 @ 4:26  The lib files @ 10/1 3:48.

Do I need to delete two of the files?  Which directory shall I delete them from ?

Do appreciate your help!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: DEBUGSTART_$CUSTINFOUNIT
« Reply #3 on: October 02, 2016, 01:37:00 pm »
no, lfm and res are nothing to do with this.

sorry out of ideas on my end.

WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: DEBUGSTART_$CUSTINFOUNIT
« Reply #4 on: October 03, 2016, 03:30:56 am »
OK.  Thanks.

Here's a thought:

I can create a new project and cut-n-paste the code into the new unit.  No problem.  However, I am concerned about losing the form.  That was a lot of work.  How do I use the form that I have already created?

Thanks!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: DEBUGSTART_$CUSTINFOUNIT
« Reply #5 on: October 03, 2016, 03:39:11 am »
if it works in a new project you have a few options:

Try (if you have not yet)
 build clean "Clean up and build"

then
1) keep the existing project, but
- delete the content of the "lib" folder in your project
  (that may already solve it)
- remove any path from (menu project > project options / Compiler Options > Path) in the field "Libraries -Fi" and "Other unit Files -Fu"
(that is unless you added them, knowing why you did add them)
- build clean "Clean up and build"


if that does not work
2) Menu Project > "Publish Project"
this makes a clean copy including your forms.

« Last Edit: October 03, 2016, 03:43:00 am by Martin_fr »

WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: DEBUGSTART_$CUSTINFOUNIT
« Reply #6 on: October 03, 2016, 08:58:32 pm »
Thanks, Martin!

Guess I have a lot more studying to do on the use and relationships of all of the Lazarus files.

Thanks for your help!!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

 

TinyPortal © 2005-2018