Can't Find UnitXY

Für Installationen unter Linux-Systemen
Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Can't Find UnitXY

Beitrag von corpsman »

Guten Morgen,

Ich hab mein Problem zwar schon als Bug Reportet, doch irgendwie scheint mich da keiner zu verstehen ( evtl liegt es ja an meinem Englisch ..)

Mein Problem ist, dass ich meine Projekte nicht mehr kompilieren kann. Auf einmal findet der Compiler ettliche Units nicht mehr.

z.B. habe ich hier ein Projekt welches die Unit libc einbindet. Diese Existiert definitiv ( /usr/share/fpcsrc/2.4.0/packages/libc/src/ )

Damit der Compiler aber nicht mehr meckert muss ich sie mittels :

Code: Alles auswählen

libc in '/usr/share/fpcsrc/2.4.0/packages/libc/src/libc.pp',
Einbinden. Doch dann gehts gleich weiter mit :
/usr/share/fpcsrc/2.4.0/packages/libc/src/libc.pp(1,1) Fatal: Can't find unit kerneldefs used by libc
Und das obwohl die IDE die Unit öffnen kann, wenn ich mit STRG + Linke Maustaste auf den entsprechenden Namen in der Libc.pp klicke.

Dieser Fehler ist nun schon seit ca. 1 Woche, also bevor ich mein Update auf Kubuntu 10.10 gemacht habe.

In der FPC.cfg musste ich auch schon die Suchpfade für die Libraries anpassen...

Weis einer von euch Lazarus Profies welche Einstellung hier falsch ist ?

Ich nutze die Aktuelle SVN Version von Lazarus und Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386

Gruß

Corpsman
--
Just try it

Benutzeravatar
af0815
Lazarusforum e. V.
Beiträge: 6888
Registriert: So 7. Jan 2007, 10:20
OS, Lazarus, FPC: FPC fixes Lazarus fixes per fpcupdeluxe (win,linux,raspi)
CPU-Target: 32Bit (64Bit)
Wohnort: Burgenland
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von af0815 »

Ich kenne die Problemstellung nur, wenn ich in der fpc.cfg die Einträge nicht richtig habe oder der Compiler die falsche fpc.cfg nimmt.

Denn wenn Lazarus selbst die Sourcen ohne Probleme findet, heisst das noch nicht, das der Compiler sie auch findet :shock: Bei dem Thema merkt man erst, das der FPC hinter Lazarus versteckt werkelt.

Was der fpc wirklich verwendet, kann man mit dem Schlater '-v' und noch einer Extension abfragen - mal fpc ohne was aufrufen, dann zeigt er die Hilfe an (Ich habe hier gerade kein Lazarus zur Verfügung).
Blöd kann man ruhig sein, nur zu Helfen muss man sich wissen (oder nachsehen in LazInfos/LazSnippets).

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

Code: Alles auswählen

corpsman@corpsman2:~$ fpc -va
[0.002] Macro defined: FPC
[0.002] Macro defined: VER2
[0.002] Macro defined: VER2_4
[0.002] Macro defined: VER2_4_0
[0.002] Macro defined: RESSTRSECTIONS
[0.002] Macro defined: FPC_HASFIXED64BITVARIANT
[0.002] Macro defined: FPC_HASINTERNALOLEVARIANT2VARIANTCAST
[0.002] Macro defined: FPC_HAS_VARSETS
[0.002] Macro defined: FPC_HAS_VALGRINDBOOL
[0.002] Macro defined: FPC_HAS_STR_CURRENCY
[0.002] Macro defined: FPC_REAL2REAL_FIXED
[0.002] Macro defined: FPC_STRTOCHARARRAYPROC
[0.002] Macro defined: FPC_NEW_BIGENDIAN_SETS
[0.002] Macro defined: FPC_STRTOSHORTSTRINGPROC
[0.002] Macro defined: FPC_OBJFPC_EXTENDED_IF
[0.002] Macro defined: FPC_HAS_INTERNAL_ABS_LONG
[0.002] Macro defined: FPC_HAS_UNICODESTRING
[0.003] Macro defined: FPC_RTTI_PACKSET1
[0.003] Macro defined: FPC_HAS_INTERNAL_ROX
[0.003] Macro defined: FPC_SUPPORTS_UNALIGNED
[0.003] Macro defined: FPC_UNALIGNED_FIXED
[0.003] Macro defined: FPC_HAS_MEMBAR
[0.003] Macro defined: FPC_SETBASE_USED
[0.003] Macro defined: INTERNAL_BACKTRACE
[0.003] Macro defined: STR_CONCAT_PROCS
[0.003] Macro defined: REGCALL
[0.003] Macro defined: FPC_HAS_FEATURE_SUPPORT
[0.003] Macro defined: CPU86
[0.003] Macro defined: CPU87
[0.003] Macro defined: CPU386
[0.003] Macro defined: CPUI386
[0.003] Macro defined: CPU32
[0.003] Macro defined: FPC_HAS_TYPE_EXTENDED
[0.003] Macro defined: FPC_HAS_TYPE_DOUBLE
[0.003] Macro defined: FPC_HAS_TYPE_SINGLE
[0.003] Configfile search: /home/corpsman/.fpc.cfg
[0.003] Configfile search: /usr/lib/fpc/etc/fpc.cfg
[0.003] Configfile search: /etc/fpc.cfg
[0.003] Reading options from file /etc/fpc.cfg
[0.003] Start of reading config file /etc/fpc.cfg
[0.003] interpreting file option "#"
[0.003] interpreting file option "# Example fpc.cfg for Free Pascal Compiler"
[0.003] interpreting file option "#"
[0.003] interpreting file option "# ----------------------"
[0.003] interpreting file option "# Defines (preprocessor)"
[0.003] interpreting file option "# ----------------------"
[0.003] interpreting file option "#"
[0.004] interpreting file option "# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed"
[0.004] interpreting file option "#"
[0.004] interpreting file option "# -d is the same as #DEFINE"
[0.004] interpreting file option "# -u is the same as #UNDEF"
[0.004] interpreting file option "#"
[0.004] interpreting file option "#"
[0.004] interpreting file option "# Some examples (for switches see below, and the -? helppages)"
[0.004] interpreting file option "#"
[0.004] interpreting file option "# Try compiling with the -dRELEASE or -dDEBUG on the commandline"
[0.004] interpreting file option "#"
[0.004] interpreting file option "# For a release compile with optimizes and strip debuginfo"
[0.004] interpreting file option "#IFDEF RELEASE"
[0.004] interpreting file option "#WRITE Compiling Release Version"
[0.004] interpreting file option "#ENDIF"
[0.004] interpreting file option "# For a debug version compile with debuginfo and all codegeneration checks on"
[0.004] interpreting file option "#IFDEF DEBUG"
[0.004] interpreting file option "#WRITE Compiling Debug Version"
[0.004] interpreting file option "#ENDIF"
[0.004] interpreting file option "# set binutils prefix"
[0.004] interpreting file option "#IFNDEF CPUI386"
[0.004] interpreting file option "#IFNDEF CPUAMD64"
[0.004] interpreting file option "#DEFINE NEEDCROSSBINUTILS"
[0.004] interpreting file option "#ENDIF"
[0.004] interpreting file option "#ENDIF"
[0.004] interpreting file option "#IFNDEF linux"
[0.004] interpreting file option "#DEFINE NEEDCROSSBINUTILS"
[0.004] interpreting file option "#ENDIF"
[0.004] interpreting file option "#IFDEF FPC_CROSSCOMPILING"
[0.004] interpreting file option "#IFDEF NEEDCROSSBINUTILS"
[0.005] interpreting file option "#ENDIF NEEDCROSSBINUTILS"
[0.005] interpreting file option "#ENDIF"
[0.005] interpreting file option "# ----------------"
[0.005] interpreting file option "# Parsing switches"
[0.005] interpreting file option "# ----------------"
[0.005] interpreting file option "# Pascal language mode"
[0.005] interpreting file option "#      -Mfpc      free pascal dialect (default)"
[0.005] interpreting file option "#      -Mobjfpc   switch some Delphi 2 extensions on"
[0.005] interpreting file option "#      -Mdelphi   tries to be Delphi compatible"
[0.005] interpreting file option "#      -Mtp       tries to be TP/BP 7.0 compatible"
[0.005] interpreting file option "#      -Mgpc      tries to be gpc compatible"
[0.005] interpreting file option "#      -Mmacpas   tries to be compatible to the macintosh pascal dialects"
[0.005] interpreting file option "#"
[0.005] interpreting file option "# Turn on Object Pascal extensions by default"
[0.005] interpreting file option "#-Mobjfpc"
[0.005] interpreting file option "# Assembler reader mode"
[0.005] interpreting file option "#      -Rdefault  use default assembler"
[0.005] interpreting file option "#      -Ratt      read AT&T style assembler"
[0.005] interpreting file option "#      -Rintel    read Intel style assembler"
[0.005] interpreting file option "#"
[0.005] interpreting file option "# All assembler blocks are AT&T styled by default"
[0.005] interpreting file option "#-Ratt"
[0.005] interpreting file option "# Semantic checking"
[0.005] interpreting file option "#      -S2        same as -Mobjfpc"
[0.005] interpreting file option "#      -Sc        supports operators like C (*=,+=,/= and -=)"
[0.005] interpreting file option "#      -Sa        include assertion code."
[0.005] interpreting file option "#      -Sd        same as -Mdelphi"
[0.005] interpreting file option "#      -Se<x>     error options. <x> is a combination of the following:"
[0.005] interpreting file option "#         <n> : compiler stops after the <n> errors (default is 1)"
[0.006] interpreting file option "#         w : compiler stops also after warnings"
[0.006] interpreting file option "#         n : compiler stops also after notes"
[0.006] interpreting file option "#         h : compiler stops also after hints"
[0.006] interpreting file option "#      -Sg        allow LABEL and GOTO"
[0.006] interpreting file option "#      -Sh        Use ansistrings"
[0.006] interpreting file option "#      -Si        support C++ styled INLINE"
[0.006] interpreting file option "#      -Sk        load fpcylix unit"
[0.006] interpreting file option "#      -SI<x>     set interface style to <x>"
[0.006] interpreting file option "#         -SIcom     COM compatible interface (default)"
[0.006] interpreting file option "#         -SIcorba   CORBA compatible interface"
[0.006] interpreting file option "#      -Sm        support macros like C (global)"
[0.006] interpreting file option "#      -So        same as -Mtp"
[0.006] interpreting file option "#      -Sp        same as -Mgpc"
[0.006] interpreting file option "#      -Ss        constructor name must be init (destructor must be done)"
[0.006] interpreting file option "#      -St        allow static keyword in objects"
[0.006] interpreting file option "#      -Sx        enable exception keywords (default in Delphi/ObjFPC modes)"
[0.006] interpreting file option "#"
[0.006] interpreting file option "# Allow goto, inline, C-operators, C-vars"
[0.006] Handling option "-Sgic"
[0.006] interpreting option "-Sgic"
[0.006] interpreting file option "# ---------------"
[0.006] interpreting file option "# Code generation"
[0.006] interpreting file option "# ---------------"
[0.006] interpreting file option "# Uncomment the next line if you always want static/dynamic units by default"
[0.006] interpreting file option "# (can be overruled with -CD, -CS at the commandline)"
[0.006] interpreting file option "#-CS"
[0.006] interpreting file option "#-CD"
[0.006] interpreting file option "# Set the default heapsize to 8Mb"
[0.006] interpreting file option "#-Ch8000000"
[0.006] interpreting file option "# Set default codegeneration checks (iocheck, overflow, range, stack)"
[0.006] interpreting file option "#-Ci"
[0.006] interpreting file option "#-Co"
[0.007] interpreting file option "#-Cr"
[0.007] interpreting file option "#-Ct"
[0.007] interpreting file option "# Optimizer switches"
[0.007] interpreting file option "# -Os        generate smaller code"
[0.007] interpreting file option "# -O1        level 1 optimizations (quick optimizations, debuggable)"
[0.007] interpreting file option "# -O2        level 2 optimizations (-O1 + optimizations which make debugging more difficult)"
[0.007] interpreting file option "# -O3        level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster)"
[0.007] interpreting file option "# -Op<x>     set target cpu for optimizing, see fpc -i for possible values"
[0.007] interpreting file option "#"
[0.007] interpreting file option "# See "fpc -i" also for more fine-grained control over which optimizations"
[0.007] interpreting file option "# to perform"
[0.007] interpreting file option "# -----------------------"
[0.007] interpreting file option "# Set Filenames and Paths"
[0.007] interpreting file option "# -----------------------"
[0.007] interpreting file option "# Slashes are also allowed under dos"
[0.007] interpreting file option "# path to the messagefile, not necessary anymore but can be used to override"
[0.007] interpreting file option "# the default language"
[0.007] interpreting file option "#-Fr/usr/lib/fpc/2.4.0/msg/errore.msg"
[0.007] interpreting file option "#-Fr/usr/lib/fpc/2.4.0/msg/errorn.msg"
[0.007] interpreting file option "# searchpath for includefiles"
[0.007] interpreting file option "#-Fi/pp/inc;/pp/rtl/inc"
[0.007] interpreting file option "#IFDEF FPCAPACHE_1_3"
[0.007] interpreting file option "#ELSE"
[0.007] interpreting file option "#IFDEF FPCAPACHE_2_0"
[0.007] interpreting file option "#ELSE"
[0.007] Handling option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux/httpd22"
[0.007] interpreting option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux/httpd22"
[0.009] interpreting file option "#ENDIF"
[0.009] interpreting file option "#ENDIF"
[0.009] interpreting file option "# searchpath for units and other system dependent things"
[0.009] Handling option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux"
[0.009] interpreting option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux"
[0.009] Handling option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux/*"
[0.009] interpreting option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux/*"
[0.013] Handling option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux/rtl"
[0.013] interpreting option "-Fu/usr/lib/fpc/2.4.0/units/i386-linux/rtl"
[0.013] interpreting file option "#-Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~/fpc/rtl/units/"
[0.014] interpreting file option "# searchpath for libraries"
[0.014] interpreting file option "#ifdef cpux86_64"
[0.014] interpreting file option "# -Fl/usr/lib/gcc/i486-linux-gnu/4.4.3 -- ALT"
[0.014] interpreting file option "#endif"
[0.014] interpreting file option "#ifdef cpui386"
[0.014] interpreting file option "# -Fl/usr/lib/gcc/i486-linux-gnu/4.4.3 -- ALT"
[0.014] Handling option "-Fl/usr/lib/gcc/i686-linux-gnu/4.5.1"
[0.014] interpreting option "-Fl/usr/lib/gcc/i686-linux-gnu/4.5.1"
[0.014] interpreting file option "#endif"
[0.014] interpreting file option "#-Fl/pp/lib"
[0.014] interpreting file option "#-Fl/lib;/usr/lib"
[0.014] interpreting file option "# -------------"
[0.014] interpreting file option "# Linking"
[0.014] interpreting file option "# -------------"
[0.014] interpreting file option "# generate always debugging information for GDB (slows down the compiling"
[0.014] interpreting file option "# process)"
[0.014] interpreting file option "#      -gc        generate checks for pointers"
[0.014] interpreting file option "#      -gd        use dbx"
[0.014] interpreting file option "#      -gg        use gsym"
[0.014] interpreting file option "#      -gh        use heap trace unit (for memory leak debugging)"
[0.014] interpreting file option "#      -gl        use line info unit to show more info for backtraces"
[0.014] interpreting file option "#      -gv        generates programs tracable with valgrind"
[0.014] interpreting file option "#      -gw        generate dwarf debugging info"
[0.014] interpreting file option "#"
[0.014] interpreting file option "# Enable debuginfo and use the line info unit by default"
[0.014] interpreting file option "#-gl"
[0.014] interpreting file option "# always pass an option to the linker"
[0.014] interpreting file option "#-k-s"
[0.014] interpreting file option "# Always strip debuginfo from the executable"
[0.014] Handling option "-Xs"
[0.014] interpreting option "-Xs"
[0.014] interpreting file option "# -------------"
[0.014] interpreting file option "# Miscellaneous"
[0.014] interpreting file option "# -------------"
[0.014] interpreting file option "# Write always a nice FPC logo ;)"
[0.014] Handling option "-l"
[0.014] interpreting option "-l"
[0.014] interpreting file option "# Verbosity"
[0.014] interpreting file option "#      e : Show errors (default)       d : Show debug info"
[0.014] interpreting file option "#      w : Show warnings               u : Show unit info"
[0.014] interpreting file option "#      n : Show notes                  t : Show tried/used files"
[0.014] interpreting file option "#      h : Show hints                  c : Show conditionals"
[0.014] interpreting file option "#      i : Show general info           d : Show debug info"
[0.014] interpreting file option "#      l : Show linenumbers            r : Rhide/GCC compatibility mode"
[0.014] interpreting file option "#      a : Show everything             x : Executable info (Win32 only)"
[0.014] interpreting file option "#      b : Write file names messages with full path"
[0.014] interpreting file option "#      v : write fpcdebug.txt with     p : Write tree.log with parse tree"
[0.014] interpreting file option "#          lots of debugging info"
[0.014] interpreting file option "#"
[0.014] interpreting file option "# Display Info, Warnings and Notes"
[0.014] Handling option "-viwn"
[0.014] interpreting option "-viwn"
[0.014] interpreting file option "# If you don't want so much verbosity use"
[0.014] interpreting file option "#-vw"
[0.014] interpreting file option "#"
[0.014] interpreting file option "# That's all folks"
[0.014] interpreting file option "#"
[0.014] End of reading config file /etc/fpc.cfg
[0.014] Handling option "-va"
[0.014] interpreting option "-va"
[0.014] Macro defined: ENDIAN_LITTLE
[0.014] Macro defined: FPC_LITTLE_ENDIAN
[0.014] Macro defined: FPC_ABI_DEFAULT
[0.014] Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386
[0.014] Copyright (c) 1993-2009 by Florian Klaempfl
[0.014] No source file name in command line
[0.014] Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
corpsman@corpsman2:~$
du meinst so ?
Zuletzt geändert von corpsman am Fr 22. Okt 2010, 09:52, insgesamt 1-mal geändert.
--
Just try it

Benutzeravatar
af0815
Lazarusforum e. V.
Beiträge: 6888
Registriert: So 7. Jan 2007, 10:20
OS, Lazarus, FPC: FPC fixes Lazarus fixes per fpcupdeluxe (win,linux,raspi)
CPU-Target: 32Bit (64Bit)
Wohnort: Burgenland
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von af0815 »

Ja, der -v Parameter hat noch weitere Möglichkeiten, damit kann man abfrage, welche Dateien genommen werden.
Blöd kann man ruhig sein, nur zu Helfen muss man sich wissen (oder nachsehen in LazInfos/LazSnippets).

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

Du hast schneller geantwortet wie ich editiert habe.

mit -va hat er mir nun alles angezeigt, und wenn ich das Richtig verstehe nutzt er die /etc/fpc.cfg und das müste ja stimmen..
--
Just try it

Benutzeravatar
af0815
Lazarusforum e. V.
Beiträge: 6888
Registriert: So 7. Jan 2007, 10:20
OS, Lazarus, FPC: FPC fixes Lazarus fixes per fpcupdeluxe (win,linux,raspi)
CPU-Target: 32Bit (64Bit)
Wohnort: Burgenland
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von af0815 »

Un dort wo er sucht liegt auch die kompilierte libc.o ?
Blöd kann man ruhig sein, nur zu Helfen muss man sich wissen (oder nachsehen in LazInfos/LazSnippets).

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

Die Ausgabe Datei wo Lazarus alles Sucht ist 4,5 MB Groß. Das kann ich leider nicht alles hier hochladen.

Ich hab mal den Teil der die Libc betrifft betrifft raus kopiert

Das Verzeichniss

/usr/share/fpcsrc/2.4.0/packages/libc/src/

ist natürlich nicht dabei :(

Ich habe nicht einen eintrag gefunden bei welchem in /usr/share/ gesucht wird.

Die Frage ist nun wo kann man das entsprechend einstellen ?

bzw. in den Lazarus Options ist das "FPC source directory" richtig mit "/usr/share/fpcsrc/$(FPCVer)/" angegeben.
Dateianhänge
libc_search.txt
(97.36 KiB) 135-mal heruntergeladen
--
Just try it

Benutzeravatar
af0815
Lazarusforum e. V.
Beiträge: 6888
Registriert: So 7. Jan 2007, 10:20
OS, Lazarus, FPC: FPC fixes Lazarus fixes per fpcupdeluxe (win,linux,raspi)
CPU-Target: 32Bit (64Bit)
Wohnort: Burgenland
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von af0815 »

wo liegt die libc.ppu bei dir ? Die für deine CPU/Arichtektur gebaute.
Blöd kann man ruhig sein, nur zu Helfen muss man sich wissen (oder nachsehen in LazInfos/LazSnippets).

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

Die ppu file liegt im Verzeichnis in dem ich die Binary gebaut habe.

Das macht sie aber auch erst seit dem ich den entsprechenden Switch ( -FU ) gesetzt hatte.

Damit ich das Projekt Compilieren kann muss ich in der lpr Datei :

Code: Alles auswählen

libc In '/usr/share/fpcsrc/2.4.0/packages/libc/src/libc.pp',
  kerneldefs In '/usr/share/fpcsrc/2.4.0/packages/libc/src/kerneldefs.pp',
  kernelioctl In '/usr/share/fpcsrc/2.4.0/packages/libc/src/kernelioctl.pp',
und den -FU switch einstellen.

Die Code Vervollständigung geht allerdings erst wenn ich die libc an allen stellen mit dem "in" einbinde.

Früher ( vor 14-Tagen ) war das definitiv nicht so und es ging wenn man die Units einfach im Projekt Inspektor eingefügt hatte.

Wobei ich eine Unit wir libc noch nie hab einbinden müssen, das waren bisher nur Units die ich quer auf der HDD verteilt hatte ( und diese hatte ich dann mittels Projekt Inspektor eingebunden und gut, doch das geht ja nu auch nicht mehr :( ).
--
Just try it

shokwave
Beiträge: 476
Registriert: Do 15. Nov 2007, 16:58
OS, Lazarus, FPC: Win11/Ubuntu Budgie (L 3.0 FPC 3.2.2)
CPU-Target: i386, x64
Wohnort: Gera

Re: Can't Find UnitXY

Beitrag von shokwave »

Bist du sicher, dass du die libc überhaupt brauchst? Siehe http://community.freepascal.org:10000/b ... m_id=24089
mfg Ingo

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

*g*

Wenn ich die Libc auskommentiere kompiliert mein Project nicht mehr

Code: Alles auswählen

Initialization
  Libc.signal(SigHup, @SigTermHandler);
Meine Anewndung versucht auf ein Beenden von Linux zu reagieren.

Das nicht finden von Units, welche um Suchpfad stehen ist aber eher ein generelles Problem, und hat sich dieses mal eben wieder gemeldet..

Dazu noch habe ich ja immer die Meldung
Initialization output:
=thread-group-added,id="i1"
nach der Compilierung, vor dem Starten des Projektes, welche irgendwie auch nicht verschwinden will...
--
Just try it

shokwave
Beiträge: 476
Registriert: Do 15. Nov 2007, 16:58
OS, Lazarus, FPC: Win11/Ubuntu Budgie (L 3.0 FPC 3.2.2)
CPU-Target: i386, x64
Wohnort: Gera

Re: Can't Find UnitXY

Beitrag von shokwave »

Hab es jetzt nicht ausprobiert, aber

Code: Alles auswählen

uses .., BaseUnix;
..
procedure SigTermHandler(signal: Longint); cdecl;
begin
  //hier Behandlung rein
end;
 
Initialization
  FpSignal(SigHup, @SigTermHandler);
end.
so könnte es gehen.

FpSignal ist auch "deprecated", laut Hilfe soll man SigAction nehmen. Da bin ich jetzt auf die schnelle aber nicht durchgestiegen. :roll:

[Edit]
Bei mir findet er die libc auch nicht, aber ich bin hier auf linux_x64, da wird die gar nicht kompiliert (siehe link von vorhin). Und die Meldung, nach dem ausführen, bekomme ich auch immer. Da spielt bestimmt wieder einer rum. :mrgreen:
mfg Ingo

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

Was die libc angeht , so gebe ich dir Recht, dieses Problem ist damit gelöst ( Wenn auch nur durch die Nutzung einer anderen Technik).

Das Ursprüngliche Problem aber bleibt.

Wenn ich eine andere Unit einbinde ( Egal welche ) und diese dann mittels

Projekt -> Projekt Inspektor -> "+" -> Add File

Hinzufüge, und im anschließenden Fragedialog "Yes" anwähle. So kann ich das Projekt weiterhin nicht kompilieren. Lediglich ein Hardcoden des Source Pfades in lpr und der Unit hilft.
--
Just try it

shokwave
Beiträge: 476
Registriert: Do 15. Nov 2007, 16:58
OS, Lazarus, FPC: Win11/Ubuntu Budgie (L 3.0 FPC 3.2.2)
CPU-Target: i386, x64
Wohnort: Gera

Re: Can't Find UnitXY

Beitrag von shokwave »

OK, ich hab es mal durchgespielt und schwupps den gleichen Fehler gefangen. Das Problem war, dass in dem Pfad, wo die eingefügte Unit lag, lag eine von mir geänderte (und veraltete) Unit der LCL. Da kam der FPC wohl mit den Suchpfaden durcheinander. Hab die störungsverursachende Unit umbenannt und jetzt läufts.

Probier doch mal, für die einzubindende Unit einen eignen Ordner zu nehmen.
mfg Ingo

Benutzeravatar
corpsman
Lazarusforum e. V.
Beiträge: 1641
Registriert: Sa 28. Feb 2009, 08:54
OS, Lazarus, FPC: Linux Mint Mate, Lazarus GIT Head, FPC 3.0
CPU-Target: 64Bit
Wohnort: Stuttgart
Kontaktdaten:

Re: Can't Find UnitXY

Beitrag von corpsman »

Gut das einer von uns beiden versteht, woran das Problem liegt ;). Mir ist es jedenfalls noch nicht ganz Klar.
Ich beschreibe nun mal einen Konkreten Fall und du schreibst mir bitte ( wie für Dumme ) was ich ändern muss, bzw falsch ist.

Ich habe eine Ordnerstruktur nennen wir sie

/Projekte/x
/Projekte/y

ich öffne Lazarus und erstelle eine Komplett neue Anwendung in Ordner x
Dann füge ich wie oben beschrieben die unit "unitxy" in mein Projekt ein. In der Unit Übersicht taucht die Unit auf, und ich kann sie im Source Editor auch öffnen.

Trotzdem kommt der Compiler fehler.

Alles zusammen hab ich dir auch noch mal als Zip mit angehängt.
Dateianhänge
Fehler.zip
(127.81 KiB) 144-mal heruntergeladen
--
Just try it

Antworten