Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Problems after upgrading ,my own component package



Permlink Replies: 4 - Last Post: Dec 6, 2016 10:59 AM Last Post By: Andrew Law Threads: [ Previous | Next ]
Asger Joergensen

Posts: 370
Registered: 11/18/08
Problems after upgrading ,my own component package
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2016 5:36 PM
Hi

As always, I have serous problems using my own components,
the components compiled and installed very well only have
one warning now.

[TLIB Warning] Warning: library was too large for page size, rebuilt with page size 128

The problem is when I use a component, then it cant
find the files. :-( :-( :-(

#include "AjBaseCtrl.h" (file not found) it is in the same
place as the source, which it just compiled

and if I pres Run it say:
Unable to find static library AjComp.a
and that i can understand because there is no file by that
name anywhere on my system.
I have never heard of this .a type of files before though
it used to be .bpl or .bpi i think.

These files in these directories are created during make
build and install of my package:

N:\BerlinDirs
CommonDir
BPL
AjComp.bpl
AjComp.ilc
AjComp.ild
AjComp.ilf
AjComp.ils
AjComp.map
AjComp.pdi
AjComp.tds
Win64
AjComp.map
AjComp.pdi
DCP
AjComp.bpi
AjComp.lib
Win64
Debug
AjComp.bpi
Hpp
Win32
PlatformsSdkDir
ProfilesDir
Repository
UserDir

I really don't understand why this have to be so difficult, it
should work totally automatically, I should not have to concern
my self with include and library path.
It is the same when I write a function name, I have to find the
right file to include and there is no suggestions like there are
in other programming environments.

Got a little air for my frustration...

Anybody know what I should do ?

Thanks in advance
Asger
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Problems after upgrading ,my own component package
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2016 6:29 PM   in response to: Asger Joergensen in response to: Asger Joergensen
Compiling in 32 bit works a little better, at least now it can
find the files, but now I get a bunch of unresolved externals

all lines start with: [ilink32 Error] Error: Unresolved external

'__InitExceptBlockLDTC' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::_String_base::_Xran() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::_String_base::_Xlen() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_ReThrowException(unsigned int, unsigned char *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_CatchCleanup()' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::exception::exception()' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_ThrowExceptionLDTC(void *, void *, void *, void *, unsigned int, unsigned int, unsigned int, unsigned char *, void *)
' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjFunctions
'__fastcall __DynamicCastVCLptr(void *, void *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjButton
'_vector_new_ldtc_(void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, void *)
'referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjArt

and I don't recall using any af those functions

p.s. I have added rtl.bpi, vcl.bpi, vclimg.bpi in the required list
and the package have been working well in CB2009 for several years.

What do I need to add ?

Thanks in advance
Best regards
Asger
Jan Dijkstra

Posts: 206
Registered: 11/4/99
Re: Problems after upgrading ,my own component package
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 5, 2016 12:01 AM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger Joergensen wrote:
Compiling in 32 bit works a little better, at least now it can
find the files, but now I get a bunch of unresolved externals

all lines start with: [ilink32 Error] Error: Unresolved external

'__InitExceptBlockLDTC' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::_String_base::_Xran() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::_String_base::_Xlen() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_ReThrowException(unsigned int, unsigned char *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_CatchCleanup()' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::exception::exception()' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_ThrowExceptionLDTC(void *, void *, void *, void *, unsigned int, unsigned int, unsigned int, unsigned char *, void *)
' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjFunctions
'__fastcall __DynamicCastVCLptr(void *, void *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjButton
'_vector_new_ldtc_(void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, void *)
'referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjArt

and I don't recall using any af those functions

p.s. I have added rtl.bpi, vcl.bpi, vclimg.bpi in the required list
and the package have been working well in CB2009 for several years.

What do I need to add ?

Thanks in advance
Best regards
Asger

__InitExceptBlockLDTC is a call to the c++ runtime library that the compiler generates at the start of each function that contains local variable declarations for data types that have a (user) defined destructor, which must be called during stack unwinding of an exception.

It seems the linker could not find the (correct) c++ library to link against.
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Problems after upgrading ,my own component package
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 5, 2016 5:28 AM   in response to: Jan Dijkstra in response to: Jan Dijkstra
Hi Jan

__InitExceptBlockLDTC is a call to the c++ runtime library that the compiler
generates at the start of each function that contains local variable
declarations for data types that have a (user) defined destructor, which must
be called during stack unwinding of an exception.

It seems the linker could not find the (correct) c++ library to link against.

Thanks for helping, I have temporarely renamed my CB2009 lib dir so it won't get
files from there, but that didn't help.

I have however managed to get the 64bit running and also the Clasic 32bit

But the non clasic compilor gives me these errors in Debug mode:

All starting with: [ilink32 Error] Error: Unresolved external

'__InitExceptBlockLDTC' referenced from N:\BERLIN\BORDERLESS\WIN32\DEBUG\BORDERLESS.OBJ
'_ThrowExceptionLDTC(void *, void *, void *, void *, unsigned int, unsigned int, unsigned int, unsigned char *, void *)' referenced from N:\BERLIN\BORDERLESS\WIN32\DEBUG\UNIT1.OBJ
'_CatchCleanup()' referenced from N:\BERLIN\BORDERLESS\WIN32\DEBUG\UNIT1.OBJ
'std::_String_base::_Xran() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::_String_base::_Xlen() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_ReThrowException(unsigned int, unsigned char *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::exception::exception()' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'__fastcall __DynamicCastVCLptr(void *, void *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjButton
'_vector_new_ldtc_(void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, void *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjArt
[ilink32 Error] Error: Unable to perform link

And in Release mode it gives me these error:

'std::ios_base::Init::{1173}...' referenced from N:\BERLIN\BORDERLESS\WIN32\RELEASE\BORDERLESS.OBJ
'std::_Winit::{1173}...' referenced from N:\BERLIN\BORDERLESS\WIN32\RELEASE\BORDERLESS.OBJ
'___seh_personality_v0' referenced from E:\EMBARCADERO\STUDIO\LIB\WIN32\RELEASE\RTLE.LIB|dstring
'__Unwind_SjLj_Register' referenced from E:\EMBARCADERO\STUDIO\LIB\WIN32\RELEASE\RTLE.LIB|dstring
'__Unwind_SjLj_Unregister' referenced from E:\EMBARCADERO\STUDIO\LIB\WIN32\RELEASE\RTLE.LIB|dstring
'___cpp_terminate' referenced from E:\EMBARCADERO\STUDIO\LIB\WIN32\RELEASE\RTLE.LIB|dstring
'___cxa_begin_catch' referenced from N:\BERLIN\BORDERLESS\WIN32\RELEASE\BORDERLESS.OBJ
'__Unwind_Resume' referenced from E:\EMBARCADERO\STUDIO\LIB\WIN32\RELEASE\RTLE.LIB|ustring
'___cxa_throw' referenced from N:\BERLIN\BORDERLESS\WIN32\RELEASE\UNIT1.OBJ
'___cxa_end_catch' referenced from N:\BERLIN\BORDERLESS\WIN32\RELEASE\UNIT1.OBJ
'___cxa_rethrow' referenced from N:\BERLIN\BORDERLESS\WIN32\RELEASE\UNIT1.OBJ
[ilink32 Error] Error: Unable to perform link

Hope somebody can figure out what the problem is.

Full commandline is below:

Thanks in advance
Best regards
Asger

Debug commandline:
bcc32c command line for "Unit1.cpp"
e:\embarcadero\studio\bin\bcc32c.exe -cc1 -D _DEBUG -n .\Win32\Debug -I N:\Berlin\Comp -I N:\Berlin\Borderless -I
e:\embarcadero\studio\include\windows\vcl -I N:\Berlin\Comp -isystem e:\embarcadero\studio\include -isystem
e:\embarcadero\studio\include\dinkumware64 -isystem e:\embarcadero\studio\include\windows\crtl -isystem e:\embarcadero\studio\include\windows\sdk
-isystem e:\embarcadero\studio\include\windows\rtl -isystem e:\embarcadero\studio\include\windows\vcl -isystem N:\BerlinDirs\CommonDir\hpp\Win32 -g
-fno-limit-debug-info -fborland-extensions -nobuiltininc -nostdsysteminc -triple i686-pc-win32-omf -emit-obj -cxx-abi borland -ffunction-sections
-fexceptions -fcxx-exceptions -fseh -mdisable-fp-elim -fno-spell-checking -fno-use-cxa-atexit -fno-threadsafe-statics -main-file-name Unit1.cpp -x
c++ -std=c++11 -O0 -fmath-errno -tM -tU -tW -o .\Win32\Debug\Unit1.obj -auto-dependency-output -MT .\Win32\Debug\Unit1.obj Unit1.cpp
brcc32 command line for "Borderless.vrc"
e:\embarcadero\studio\bin\cgrc.exe -c65001 Borderless.vrc -foBorderless.res
ilink32 command line
e:\embarcadero\studio\bin\ilink32.exe -G8 -L.\Win32\Debug;e:\embarcadero\studio\lib\Win32\debug;e:\embarcadero\studio\lib\win32c\release;
e:\embarcadero\studio\lib\win32\release;e:\embarcadero\studio\lib\win32\release\psdk;N:\BerlinDirs\CommonDir\DCP -j.\Win32\Debug;
e:\embarcadero\studio\lib\Win32\debug;e:\embarcadero\studio\lib\win32c\release;e:\embarcadero\studio\lib\win32\release;
e:\embarcadero\studio\lib\win32\release\psdk;N:\BerlinDirs\CommonDir\DCP -l.\Win32\Debug -v -Gn -aa -V5.0 -Tpe c0w32w memmgr.lib sysinit.obj
.\Win32\Debug\Borderless.obj .\Win32\Debug\Unit1.obj , .\Win32\Debug\Borderless.exe , .\Win32\Debug\Borderless.map , rtl.lib vcl.lib vclimg.lib
AjComp.lib import32.lib cp32mt.lib , , Borderless.res

Release commandline:
bcc32c command line for "Unit1.cpp"
e:\embarcadero\studio\bin\bcc32c.exe -cc1 -D NDEBUG -n .\Win32\Release -I N:\Berlin\Comp -I N:\Berlin\Borderless -I
e:\embarcadero\studio\include\windows\vcl -I N:\Berlin\Comp -isystem e:\embarcadero\studio\include -isystem
e:\embarcadero\studio\include\dinkumware64 -isystem e:\embarcadero\studio\include\windows\crtl -isystem e:\embarcadero\studio\include\windows\sdk
-isystem e:\embarcadero\studio\include\windows\rtl -isystem e:\embarcadero\studio\include\windows\vcl -isystem N:\BerlinDirs\CommonDir\hpp\Win32
-fborland-extensions -nobuiltininc -nostdsysteminc -triple i686-pc-win32-omf -emit-obj -cxx-abi borland -ffunction-sections -fexceptions
-fcxx-exceptions -fseh -mdisable-fp-elim -fno-spell-checking -fno-use-cxa-atexit -fno-threadsafe-statics -x c++ -std=c++11 -O2 -fmath-errno -tM -tU
-tW -o .\Win32\Release\Unit1.obj -auto-dependency-output -MT .\Win32\Release\Unit1.obj Unit1.cpp
brcc32 command line for "Borderless.vrc"
e:\embarcadero\studio\bin\cgrc.exe -c65001 Borderless.vrc -foBorderless.res
ilink32 command line
e:\embarcadero\studio\bin\ilink32.exe -G8 -L.\Win32\Release;e:\embarcadero\studio\lib\Win32\release;e:\embarcadero\studio\lib\win32c\release;
e:\embarcadero\studio\lib\win32\release;e:\embarcadero\studio\lib\win32\release\psdk;N:\BerlinDirs\CommonDir\DCP -j.\Win32\Release;
e:\embarcadero\studio\lib\Win32\release;e:\embarcadero\studio\lib\win32c\release;e:\embarcadero\studio\lib\win32\release;
e:\embarcadero\studio\lib\win32\release\psdk;N:\BerlinDirs\CommonDir\DCP -l.\Win32\Release -Gn -aa -V5.0 -Tpe c0w32w memmgr.lib sysinit.obj
.\Win32\Release\Borderless.obj .\Win32\Release\Unit1.obj , .\Win32\Release\Borderless.exe , .\Win32\Release\Borderless.map , rtl.lib vcl.lib
vclimg.lib AjComp.lib import32.lib cp32mt.lib , , Borderless.res

Andrew Law

Posts: 74
Registered: 11/6/02
Re: Problems after upgrading ,my own component package
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2016 10:59 AM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger Joergensen wrote:


But the non clasic compilor gives me these errors in Debug mode:

All starting with: [ilink32 Error] Error: Unresolved external

'__InitExceptBlockLDTC' referenced from N:\BERLIN\BORDERLESS\WIN32\DEBUG\BORDERLESS.OBJ
'_ThrowExceptionLDTC(void *, void *, void *, void *, unsigned int, unsigned int, unsigned int, unsigned char *, void *)' referenced from N:\BERLIN\BORDERLESS\WIN32\DEBUG\UNIT1.OBJ
'_CatchCleanup()' referenced from N:\BERLIN\BORDERLESS\WIN32\DEBUG\UNIT1.OBJ
'std::_String_base::_Xran() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::_String_base::_Xlen() const' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'_ReThrowException(unsigned int, unsigned char *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'std::exception::exception()' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjBmp
'__fastcall __DynamicCastVCLptr(void *, void *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjButton
'_vector_new_ldtc_(void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, void *)' referenced from N:\BERLINDIRS\COMMONDIR\DCP\AJCOMP.LIB|AjArt
[ilink32 Error] Error: Unable to perform link

Try disabling "Link with runtime packages" and re-build. I have seen those three errors starting with _InitExceptBlockLDTC, and it always seems to be down to building with runtime packages being turned on by default. Applying a pre-configured option set often clears this up.

And in Release mode it gives me these error:

Sorry, nothing to suggest on that one.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02