[omniORB] Trying to compile the omniorb 4.0.6 wiht the Borland 6 C++ Compiler

marciniak.z at atlas.de marciniak.z at atlas.de
Wed Sep 21 12:42:51 BST 2005


Hi there,
 
since few days I am trying to compile the omniorb 4.0.6 with the Borland
6 C++ Compiler.
I have problems with linking the omniORB_rt.dll.



I started with internet search. The latest information about omniORB and
BCB is the work performed by Mr. Mikhail Soukhanov. He was porting
omniORB 3.0.3 with BCB5.5. I have downloaded the omniORB 3.0.3 he
ported. 

I wanted to compile the omniORB4.0.6 with Borland's IDE so I loaded the
omniORB.bpg project (from omniORB 3.0.3) in the ~\src\x86_bcc32
directory.
IDE automatically addopted this project to BCB6 (as stated before they
were in BCB5.5 version).
I have compared the sources used in the subprojects with the makefiles
(i.e. dir.mk files) in 4.0.6 and replaced them in the corresponding
sub-projects. For example in ~\src\x86_bcc32\ide\omniORB3_rt.bpr quite a
large number of files is new due to the development progress between
3.0.3 and 4.0.6. 
 
Since omniidl.exe needs python/BCB I gave up to port this subproject. We
can use omniidl.exe built with MSVC6 (i.e. MS Visual C++ 6).  
 
The current status of my work is:
 
1.    omnicpp.exe was compiled without problems.
2.    omnithread_rt.dll was compiled without problems.
3.    omniORB_rt.dll has 25 linker errors:
	[Linker Fehler] Unresolved external
'omni_thread::init_t::init_t()' referenced from
D:\OMNIORB-4.0.6_BCB6\SRC\X86_BCC32\IDE\OBJ\LIB\ORBCORE\LIBCWRAPPER.OBJ
	[Linker Fehler] Unresolved external
'omni_thread::init_t::~init_t()' referenced from
D:\OMNIORB-4.0.6_BCB6\SRC\X86_BCC32\IDE\OBJ\LIB\ORBCORE\LIBCWRAPPER.OBJ
	[Linker Fehler] Unresolved external 'omni_thread::self()'
referenced from
D:\OMNIORB-4.0.6_BCB6\SRC\X86_BCC32\IDE\OBJ\LIB\ORBCORE\LOGIOSTREAM.OBJ
	[Linker Fehler] Unresolved external 'omni_thread::sleep(unsigned
long, unsigned long)' referenced from
D:\OMNIORB-4.0.6_BCB6\SRC\X86_BCC32\IDE\OBJ\LIB\ORBCORE\EXCEPTION.OBJ
	... etc ...

To check if this is just an error in this particular subproject I
proceeded with omniDynamic_rt.dll and omniNames.exe - with the same
result: "Unresolved external 'omni_thread::init_t::init_t()' ...".
Hence, I assumed that omnithread.dll has not been built correctly. 

So I have compared omnithread.lib I've got from BCB6 and the one built
with MSVC6. 
I found that e.g. omni_thread::init_t symbol exists only 2 times in the
omnithread.lib/BCB6 and 6 times in the omnithread.lib/MSVC6. 
Now I was convinced that I've done something wrong in step 2 above i.e.
when compiling omnithread_rt.dll.

I dropped ~\src\x86_bcc32\lib\omnithread\nt.cc from the new 4.0.6 and
put the old nt.cc from 3.0.3 also adopting the include path options.
Recompilation did not change anything: same linker error.

When compiling the nt.cc source I was using following options (excuse my
translation errors in these options: I am using German version of the
BCB6):
==>Compiler: 
		no code optimisation, 
		no precompiled headers, 
		all warnings, 
		inline expansion deactivated, 
		enum-type as int, 
		extended error information
==>Extended compiler options: 
		Pentium,
		create underlines
		double word
		C call convention
		Borland language convention
		none register variables
		MFC compatibility
==> C++
Element pointer "all cases" 
		Templates "extern"
		Exception handling - all checkboxes on
Compatibility - both checkboxes on (not limited on loops, code
modificator not limited)
		virtual tables "public"
		general "empty basic classes set on 0" and "empty basic
class elements set on 0" 
		compile mode "C++ enforced"
==> Linker
		use dynamic RTL
		create import library
		no status data created
		all warnings
		detailed map data
		PE-file options: 
			min heap 0x1000, 
			max heap 0x100000, 
			image basic address 0x400000, 
			main subsystem 4, 
			side subsystem 0
==> Extended linker
		resources replaced on (the rest checkboxes are off)
==> Code Guard
		all checkboxes are on
==> Directories:
Include path:
..\include;..\lib\omnithread;..\..\lib\omnithread;$(BCB)\include
(relative paths pointing at the 4.0.6 or 3.0.3 when compiling 3.0.3
nt.cc)
Lib path:     ..\..\lib\omnithread;..\lib\omnithread;$(BCB)\lib
Definitions:  _OMNITHREAD_DLL;__BCPLUSPLUS__=0x600




Questions:

1	Why I get Unresolved external
'omni_thread::init_t::init_t()'...? I guess it is not in the
omnithread_rt.lib, is it correct?
2	Why these symbols are not in the omnithread_rt.lib? They are in
the nt.cc source.
3	How to build omnithread_rt.lib and dll so that these symbols
will be defined there and can be found when building omniORB_rt
subproject?


Any ideas?


Thanks!


Zbigniew Marciniak



PS: 	If we manage to create omniORB 4.0.6 with BCB is it possible to
include the working ide projects int the omniorb repository?




More information about the omniORB-list mailing list