Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-05

Erro: undefined symbol

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antonio Fortuny

Hi All.

Maybe I'm coming back with an old thing but I can't get rid of it. I've compiled and installed a new package (UIB): no problem anywhere. Then I begin to use the package into a new project. I've just added the package to the project and nothing else.
At the compilation I get the error messages:
UibDataSet.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET UibDataSet.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASET_TUIBDATASET UibDataSet.lpr(20,1) Fatal: There were 2 errors compiling module, stopping

Line 20 is the
end.
of th lpr.
No components have been used yet neither any unit from the new package. I didn't find any solution for it on the net and removing *.ppu and *.o does not solve the problem.
Neither does the change from {$mode objfpc} (my default) to {$mode DELPHI}. Removing debug options in linker doe not solve the problem. There are no other *.ppu nor *.o from the package anywhere in the target PC.

Any ideas N?

Antonio.

Reply by email

Antonio Fortuny
to Antonio Fortuny

Hi All.

There is some more details:
Errors occur only when using a specific unit: uibdataset.pas I still don't understand why theses linker error araise knownig that the synbols in question are not defined neither as whole words nor as separate words.
I'm looking for special defines

Antonio.

Reply by email

Mark Morgan Lloyd
to Antonio Fortuny
Antonio Fortuny wrote 8 lines
Hi All. There is some more details: Errors occur only when using a specific unit: uibdataset.pas I still don't understand why theses linker error araise knownig that the synbols in question are not defined neither as whole words nor as separate words. I'm looking for special defines

Does the unit attempt to start a background thread?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Antonio Fortuny
to Mark Morgan Lloyd

Le 29/05/2012 13:41, Mark Morgan Lloyd a ?crit :

Show quoted text 11 lines
Antonio Fortuny wrote: > Hi All. > > There is some more details: > Errors occur only when using a specific unit: uibdataset.pas > I still don't understand why theses linker error araise knownig that > the synbols in question are not defined neither as whole words nor as > separate words. > I'm looking for special defines Does the unit attempt to start a background thread?

Not at all

Reply by email

Unknown author
to Antonio Fortuny: Hi All. Maybe I'm coming back with an old thing but I can't get rid of it. I've compiled…
Antonio Fortuny wrote 20 lines
Hi All. Maybe I'm coming back with an old thing but I can't get rid of it. I've compiled and installed a new package (UIB): no problem anywhere. Then I begin to use the package into a new project. I've just added the package to the project and nothing else. At the compilation I get the error messages: UibDataSet.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET UibDataSet.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASET_TUIBDATASET UibDataSet.lpr(20,1) Fatal: There were 2 errors compiling module, stopping Line 20 is the end. of th lpr. No components have been used yet neither any unit from the new package. I didn't find any solution for it on the net and removing *.ppu and *.o does not solve the problem. Neither does the change from {$mode objfpc} (my default) to {$mode DELPHI}. Removing debug options in linker doe not solve the problem. There are no other *.ppu nor *.o from the package anywhere in the target PC.

Do you include the unit UIBDATASET in the uses clause?

Do you actually use something from the unit ?

if not, try to do so.

It looks like the compiler decided that the UIBDATASET unit uses threadvars, and includes them in the global list of threadvars, but then sees that you don't actually use the unit, so does not include the unit in the link script.

Michael.

Reply by email

Antonio Fortuny
to Unknown author

Le 29/05/2012 13:45, a ?crit :

Show quoted text 29 lines
On Tue, 29 May 2012, Antonio Fortuny wrote: > Hi All. > > Maybe I'm coming back with an old thing but I can't get rid of it. > I've compiled and installed a new package (UIB): no problem anywhere. > Then I begin to use the package into a new project. I've just added > the package to the project and nothing else. > At the compilation I get the error messages: > UibDataSet.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET > UibDataSet.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASET_TUIBDATASET > UibDataSet.lpr(20,1) Fatal: There were 2 errors compiling module, > stopping > > Line 20 is the > end. > of th lpr. > No components have been used yet neither any unit from the new package. > I didn't find any solution for it on the net and removing *.ppu and > *.o does not solve the problem. > Neither does the change from {$mode objfpc} (my default) to {$mode > DELPHI}. > Removing debug options in linker doe not solve the problem. > There are no other *.ppu nor *.o from the package anywhere in the > target PC. Do you include the unit UIBDATASET in the uses clause?

yes

Do you actually use something from the unit ?

yes, a dropped component from uib component palette, nothing else

Show quoted text 9 lines
if not, try to do so. It looks like the compiler decided that the UIBDATASET unit uses threadvars, and includes them in the global list of threadvars, but then sees that you don't actually use the unit, so does not include the unit in the link script.

sounds reasonnable

I have restarted a new project doing this:
1. create a new application
drop a close button and add into the event onclick: Close; Compile & run ok
2. add uiblaz package to project
compile & run: OK 8-)
3. drop TUibDatabse, TUibTransaction, TUibQuery
compile & run: OK
4. implement whatever the test program needs (query execute for read and update data including firebird arrays for which I changed the unit uiblib) compile & run: OK
So far so good.
5. add the unit uibdataset to the interfacse uses clause and guess what: Hint: Start of reading config file
D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg Hint: End of reading config file
D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.6.1 [2012/04/26] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling TestUIB.lpr
Compiling TestUIBMain.pas
...
TestUIBMain.pas(50,30) Hint: Parameter "Sender" not used TestUIBMain.pas(18,3) Hint: Unit "uibdataset" not used in TestUIBMain sounds of as far as I do not use anything from it
Compiling resource D:\Compiled\Lazarus\DCU\TestUIB.or Linking D:\Compiled\Lazarus\TestUIB.exe
TestUIB.lpr(20,1) Error: Multiple defined symbol PASCALMAIN TestUIB.lpr(20,1) Error: Multiple defined symbol _main TestUIB.lpr(20,1) Error: Multiple defined symbol INITFINAL TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_THREADVARTABLES TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_RESOURCESTRINGTABLES TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_WIDEINITTABLES TestUIB.lpr(20,1) Error: Multiple defined symbol __heapsize TestUIB.lpr(20,1) Error: Multiple defined symbol __fpc_valgrind TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGINFO_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGSTART_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGEND_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: U_UIBDATASETMAIN_FORM1 TestUIB.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASETMAIN_TFORM1 TestUIB.lpr(20,1) Fatal: There were 15 errors compiling module, stopping

6. drop a TUibDataset
Options changed, recompiling clean with -B
Hint: Start of reading config file
D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg
Hint: End of reading config file
D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.6.1 [2012/04/26] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling TestUIB.lpr
Compiling TestUIBMain.pas
...
TestUIBMain.pas(51,30) Hint: Parameter "Sender" not used
Compiling resource D:\Compiled\Lazarus\DCU\TestUIB.or
Linking D:\Compiled\Lazarus\TestUIB.exe
TestUIB.lpr(20,1) Error: Multiple defined symbol PASCALMAIN
TestUIB.lpr(20,1) Error: Multiple defined symbol _main
TestUIB.lpr(20,1) Error: Multiple defined symbol INITFINAL
TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_THREADVARTABLES
TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_RESOURCESTRINGTABLES
TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_WIDEINITTABLES
TestUIB.lpr(20,1) Error: Multiple defined symbol __heapsize
TestUIB.lpr(20,1) Error: Multiple defined symbol __fpc_valgrind
TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET
TestUIB.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASET_TUIBDATASET
TestUIB.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASET_TUIBCUSTOMDATASET
TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGINFO_UIBDATASETMAIN
TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGSTART_UIBDATASETMAIN
TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGEND_UIBDATASETMAIN
TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASETMAIN
TestUIB.lpr(20,1) Error: Undefined symbol: U_UIBDATASETMAIN_FORM1
TestUIB.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASETMAIN_TFORM1
TestUIB.lpr(20,1) Fatal: There were 17 errors compiling module, stopping

In project options, generate debug data is checked, debugger is set to automatic
heaptrc is NOT checked,
valgrind output is NOT checked

changing to dwarf debugger does not change anything

Antonio.

Show quoted text 8 lines
Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Sven Barth
to Antonio Fortuny
Antonio Fortuny wrote 44 lines
I have restarted a new project doing this: 1. create a new application drop a close button and add into the event onclick: Close; Compile & run ok 2. add uiblaz package to project compile & run: OK 8-) 3. drop TUibDatabse, TUibTransaction, TUibQuery compile & run: OK 4. implement whatever the test program needs (query execute for read and update data including firebird arrays for which I changed the unit uiblib) compile & run: OK So far so good. 5. add the unit uibdataset to the interfacse uses clause and guess what: Hint: Start of reading config file D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg Hint: End of reading config file D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.6.1 [2012/04/26] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling TestUIB.lpr Compiling TestUIBMain.pas ... TestUIBMain.pas(50,30) Hint: Parameter "Sender" not used TestUIBMain.pas(18,3) Hint: Unit "uibdataset" not used in TestUIBMain sounds of as far as I do not use anything from it Compiling resource D:\Compiled\Lazarus\DCU\TestUIB.or Linking D:\Compiled\Lazarus\TestUIB.exe TestUIB.lpr(20,1) Error: Multiple defined symbol PASCALMAIN TestUIB.lpr(20,1) Error: Multiple defined symbol _main TestUIB.lpr(20,1) Error: Multiple defined symbol INITFINAL TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_THREADVARTABLES TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_RESOURCESTRINGTABLES TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_WIDEINITTABLES TestUIB.lpr(20,1) Error: Multiple defined symbol __heapsize TestUIB.lpr(20,1) Error: Multiple defined symbol __fpc_valgrind TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGINFO_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGSTART_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGEND_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASETMAIN TestUIB.lpr(20,1) Error: Undefined symbol: U_UIBDATASETMAIN_FORM1 TestUIB.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASETMAIN_TFORM1 TestUIB.lpr(20,1) Fatal: There were 15 errors compiling module, stopping

From this output it seems that you have a compiled main program file named uibdataset.o lying around where the compiler can find it. Please remove all *.ppu and *.o files in the project directory, the unit output directory of the project and the unit output directory of the uiblaz package.

Regards,
Sven

Reply by email

Antonio Fortuny
to Sven Barth

Le 29/05/2012 14:46, Sven Barth a ?crit :

Show quoted text 50 lines
Am 29.05.2012 14:04, schrieb Antonio Fortuny: > I have restarted a new project doing this: > 1. create a new application > drop a close button and add into the event onclick: Close; > Compile & run ok > 2. add uiblaz package to project > compile & run: OK 8-) > 3. drop TUibDatabse, TUibTransaction, TUibQuery > compile & run: OK > 4. implement whatever the test program needs (query execute for read and > update data including firebird arrays for which I changed the unit > uiblib) > compile & run: OK > So far so good. > 5. add the unit uibdataset to the interfacse uses clause and guess what: > Hint: Start of reading config file > D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg > Hint: End of reading config file > D:\Programmes\lazarus\fpc\2.6.1\bin\i386-win32\fpc.cfg > Free Pascal Compiler version 2.6.1 [2012/04/26] for i386 > Copyright (c) 1993-2012 by Florian Klaempfl and others > Target OS: Win32 for i386 > Compiling TestUIB.lpr > Compiling TestUIBMain.pas > ... > TestUIBMain.pas(50,30) Hint: Parameter "Sender" not used > TestUIBMain.pas(18,3) Hint: Unit "uibdataset" not used in TestUIBMain > sounds of as far as I do not use anything from it > Compiling resource D:\Compiled\Lazarus\DCU\TestUIB.or > Linking D:\Compiled\Lazarus\TestUIB.exe > TestUIB.lpr(20,1) Error: Multiple defined symbol PASCALMAIN > TestUIB.lpr(20,1) Error: Multiple defined symbol _main > TestUIB.lpr(20,1) Error: Multiple defined symbol INITFINAL > TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_THREADVARTABLES > TestUIB.lpr(20,1) Error: Multiple defined symbol > FPC_RESOURCESTRINGTABLES > TestUIB.lpr(20,1) Error: Multiple defined symbol FPC_WIDEINITTABLES > TestUIB.lpr(20,1) Error: Multiple defined symbol __heapsize > TestUIB.lpr(20,1) Error: Multiple defined symbol __fpc_valgrind > TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASET > TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGINFO_UIBDATASETMAIN > TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGSTART_UIBDATASETMAIN > TestUIB.lpr(20,1) Error: Undefined symbol: DEBUGEND_UIBDATASETMAIN > TestUIB.lpr(20,1) Error: Undefined symbol: THREADVARLIST_UIBDATASETMAIN > TestUIB.lpr(20,1) Error: Undefined symbol: U_UIBDATASETMAIN_FORM1 > TestUIB.lpr(20,1) Error: Undefined symbol: VMT_UIBDATASETMAIN_TFORM1 > TestUIB.lpr(20,1) Fatal: There were 15 errors compiling module, stopping From this output it seems that you have a compiled main program file named uibdataset.o lying around

You are absolutely right. It was a very old unit from an old test programp. I was focused on the UIB sources and I did forget this oldy test program. When removed, everything falls in place. Thanks a lot to you all. :-)

Show quoted text 12 lines
where the compiler can find it. Please remove all *.ppu and *.o files in the project directory, the unit output directory of the project and the unit output directory of the uiblaz package. Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email