[SOLVED] Undefined symbol: VMT_DOM_TDOMATTRDEF; compiled with Laz 1.0.12 for Win lazarus / 34-Windows ---------------------------------------------------------------------- vrull · 2013-09-12 21:49 After upgrading Lazarus to latest stable version 1.0.12 can no longer compile my project. It points to the last "end." statement in project code and says Code: [Select]XMLTreeEdit.lpr(40,1) Error: Undefined symbol: VMT_DOM_TDOMATTRDEFEnvironment: OS Windows 7 64 bit Lazarus 1.0.12 FPC 2.6.2 SVN rev. 42478 i386-win32-win32/win64 Same code is compiled fine with Lazarus 1.0.12 for GTK2+ on Ubuntu. It compiled on Lazarus versions 1.0, 1.0.2, 1.0.6 with no problems in both Windows and Linux/GTK2+ before. Any ideas? Edit: Search for "VMT_DOM_TDOMATTRDEF" in C:\lazarus folder did not reveal any files with this content, while in Ubuntu there were three of four binary files with this sub-string inside. Is this something made obsolete? ---------------------------------------------------------------------- marcov · 2013-09-13 13:54 VMT_DOM_TDOMATTRDEF is probably he VMT (Virtual Method Table) of the TDomAttrDef class of the DOM unit. (in the FPC FCL-XML unit) It might be a problem with the internal linker, try if adding -Xe to the switches helps. ---------------------------------------------------------------------- vrull · 2013-09-20 00:09 Thanks for the suggestion, but -Xe option did not help. I tried to compile with option "Show all" and there is the result (although I cannot get use of it): Somewhere, close to the end of huge output, it says: Code: [Select]Debug: Writing output file C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\XMLTreeEdit.or... Debug: Output file C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\XMLTreeEdit.or written Debug: Time elapsed: 0.20 seconds Debug: Cleaning up Searching file C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\XMLTreeEdit.o... not found Searching file C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\XMLTreeEdit.o... found Searching file C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\C:\Projects\lazarus\XMLEditor\xmltreeedit- code\lib\i386-win32\XMLTreeEdit.or... not found then hundreds of rows "Searching ... found /not found" and eventually: Code: [Select]Reading object C:\lazarus\fpc\2.6.2\units\i386-win32\rtl\sysinitpas.o Number of unresolved externals in objects 515 Number of unresolved externals after static libraries 515 Number of unresolved externals after defining COMMON symbols 515 Number of unresolved externals after DLL imports 1 Undefined symbol: VMT_DOM_TDOMATTRDEF There were 1 errors compiling module, stopping Compilation aborted Error: C:\lazarus\fpc\2.6.2\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled) The project code is below: Code: [Select]uses   {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF}   Interfaces, // this includes the LCL widgetset   Forms, RegisterFormClass,   uGlobal, uMain, uNode, uEditor, uFind, uMoveNode, uRefTree, uOptions; {$R *.res} begin   RequireDerivedFormResource := True;   Application.Initialize;   Application.CreateForm(TfrmMain, frmMain);   Application.Run; end. The compiler points to the last line of the code above. As I said I had no problems before Lazarus update from 1.0.6 to 1.0.12 , neither do I have them with Lazarus 1.0.12 on Ubuntu now with exactly same project. ---------------------------------------------------------------------- Martin_fr · 2013-09-20 01:10 This error could mean (just one possibility) that you have extra ppu or .o files. If the symbol was moved to another source file, then it is in the new ppu/o. But if the olrd one is still there, and is also used for some reason, then the symbol exists twice This symbol also exists in lazarus. A recompile "clean all" can help. Maybe delete all ppu and all *.o files in the components/lazutils folder, and then build again. ---------------------------------------------------------------------- vrull · 2013-09-20 03:57 Thank you very much, I've got it. The steps were: 1. Tools -> Configure Build Lazarus -> Clean All -> Build = did not help 2. removed everything from C:\lazarus\components\lazutils\lib\i386-win32\    then step 1 again = did not help 3. with my project open: Run -> Clean Up Build Files -> Clean Up and Build = working I intentionally left step 1. and 2. as they might contribute to the success on step 3. Thank you again!