Recent

Author Topic: FPG Symbol Not Found  (Read 3462 times)

gregv

  • New Member
  • *
  • Posts: 25
FPG Symbol Not Found
« on: October 12, 2016, 09:17:57 pm »
Hello everyone!

I'm trying to use some of the generic collections in fpc.  Everything seems to compile, but linking poses a problem.

I get the following errors:
Code: Pascal  [Select][+][-]
  1. Portfolio.lpr(21,1) Error: Undefined symbol: VMT_$FGL_$$_TFPGMAP$2
  2. Portfolio.lpr(21,1) Error: Undefined symbol: FGL$_$TFPGMAP$2_$__$$_CREATE$$TFPGMAP$2

Obviously something isn't getting compiled and sent to the linker.  Is there a requirement that I need to use TFPGMap, or some extra files?

Thanks!

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • FPC developer.
Re: FPG Symbol Not Found
« Reply #1 on: October 12, 2016, 09:36:43 pm »
No. Either you hit a compiler bug, or maybe you are mixing versions. (if you upgraded FPC/Lazarus recently, did you clean out old .o/.ppu's ?)

If that is not the case, make a minimal console program demonstrating the problem and post it on the bugtracker (or first here, and I'll tell you if I can repoduce before you go to the bugtracker )

gregv

  • New Member
  • *
  • Posts: 25
Re: FPG Symbol Not Found
« Reply #2 on: October 12, 2016, 10:50:43 pm »
I made a simple console application

Code: Pascal  [Select][+][-]
  1. program Project1;
  2.  
  3. {$mode objpfc}{$H+}
  4.  
  5. uses Classes, fgl;
  6.  
  7. type
  8.  
  9. TMyMap = specialize TFPGMap<String, Integer>;
  10.  
  11. var
  12. MyMap = TMyMap;
  13.  
  14. begin
  15. MyMap := TMyMap.Create;
  16. end.

There was no problem in linking this.  In the other application, I chose the "Build and Clean" option in the project menu.  Further, I deleted all the files in the "lib" folder.

There are still problems linking this application.  Where else are previously compiled files located?

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: FPG Symbol Not Found
« Reply #3 on: October 12, 2016, 10:56:26 pm »
You could try deleting the /lib subdirectory (it will be recreated at compilation).

gregv

  • New Member
  • *
  • Posts: 25
Re: FPG Symbol Not Found
« Reply #4 on: October 13, 2016, 03:13:25 am »
Deleting the subdirectory did not change the results.

gregv

  • New Member
  • *
  • Posts: 25
[Solved] Re: FPG Symbol Not Found
« Reply #5 on: October 13, 2016, 05:35:56 am »
Bit of a false alarm.  There was a stray TFPGMap.Create in my original application that screwed things up.  Using the helper type (such as the console application posted) corrected the problem.

Sorry!

 

TinyPortal © 2005-2018