A r t i c l e s
Navigation

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

FreePascal Compiler Troubleshooting


Compiler says:
 Warning: Comment level 2 found
 Fatal: Unexpected end of file
Check for open comments, i.e. an open parenthisis {} , an open (* *). Also if you are using an older compiler without certain command line options set, you may have a nested comment problem
DLL or Library issues:
 
 Remember in some cases, in your DLL/program you can define:
  {$apptype GUI} // you may need to define this for a DLL in Windows, if the DLL is   
                 // being called from a GUI program. 

Problem: "Cannot find unit types"
         "Can't find unit types"
         "Can't find unit system"
Solution:
 It could be:
  -Damaged FPC.CFG file
  -Did you delete FPC.CFG file by accident?
  -Try a fresh copy of FPC.CFG that came with your installation. 
   Rename the old one to fpc.cfg.old
  -on linux, you could have a conflict. try deleting /usr/lib/fpc 
    then apt-get --purge fp-compiler.
    then apt-get install fp-units-rtl
    then apt-get install fp-compiler

Problem:
 Error: Can't call the linker, switching to external linking

Many causes for this one (use the -va compiler option to see more details).. but..
Possible causes: 
 - not enough memory available (especially on big programs).
 - FPC 2.0.X and source code still uses short strings, try shorter paths everywhere!  
   store your program and units in a nice short path C:\tmp\ or /home/tmp/ on linux.
 - problems with linker. Remove bin utils and reinstall them, check environment PATH  
   variables. 

Problem:
 cannot find -lpthread

Solution:
 apt-get install libc6-dev



About
Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _