running CORBA (TAO) based applications through momentics.

Hello,

We have built a TAO based CORBA server code in momentics (installed on windows). Prior to that we had built TAO and ACE on QNX and copied the resulting libraries to the windows machine. We then built the corba server by pointing the linker settings in momentics to point to the TAO and the ACE libraries.

We executed the tao_idl compiler on the idl file and built the code using the files generated by this tool.

The problem is when the momentics environment deploys the executable on to QNX for execution the server crashes.

We have created a make file by modifying the make file of a chat program available on the internet. When we built the code on QNX using this make file the program runs successfully.

Can any one please let us know how to build and execute CORBA applications in momentics (installed on windows)?

Any help would be greately appreciated.

I have attached the source code of the corba server, the make file used (GNUmakefile.chat_client) and the build output of momentics (build_output.txt).

Regards,
-Sameer

In case the attachement hasnt gone through here are the content of the “GNUMakefile.chat_client” and “Build_output.txt” files

//
GNUMakefile.chat_client
/
***/

-- Makefile --

#----------------------------------------------------------------------------

GNU Makefile

@file GNUmakefile.chat_client

$Id: gnu.mpd 77593 2007-03-07 16:38:39Z elliott_c $

This file was automatically generated by MPC. Any changes made directly to

this file will be lost the next time it is generated.

#----------------------------------------------------------------------------
MAKEFILE = GNUmakefile.chat_client
DEPENDENCY_FILE = .depend.chat_client
BIN_UNCHECKED = server

TAO_ROOT ?= $(ACE_ROOT)/TAO

FILES =
basicS.cpp
basicI.cpp
basicC.cpp
main.cpp

#----------------------------------------------------------------------------

Include macros and targets

#----------------------------------------------------------------------------
LDLIBS = -lTAO_Utils -lTAO_PI -lTAO_CodecFactory -lTAO_PortableServer -lTAO_AnyTypeCode -lTAO -lACE

include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
include $(TAO_ROOT)/rules.tao.GNU

BIN = $(BIN_UNCHECKED)$(EXEEXT)

If it contains …/ at all use notdir.

OBJS = basicS.o basicI.o basicC.o main.o
SRC = $(FILES)

include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU

include $(ACE_ROOT)/include/makeinclude/rules.local.GNU

$(BIN): $(addprefix $(VDIR), $(OBJS))
$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS)

realclean: clean
ifneq ($(GENERATED_DIRTY),)
-$(RM) -r $(GENERATED_DIRTY)
endif

prebuild:
@-:

//
Build_output.txt
/
**/

make -k EXTRA_SUFFIXES=cpp all --file=D:/QNX632/ide4-workspace/Server/QMakefile30935.tmp
make -j 1 -Cx86 -fMakefile all
make[1]: Entering directory D:/QNX632/ide4-workspace/Server/x86' make -j 1 -Co -fMakefile all make[2]: Entering directory D:/QNX632/ide4-workspace/Server/x86/o’
C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include D:/QNX632/ide4-workspace/Server/basicC.cpp
In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-all.h:20,
from D:/QNX632/ide4-workspace/Server/basicC.h:35,
from D:/QNX632/ide4-workspace/Server/basicC.cpp:32:
C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file
C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include D:/QNX632/ide4-workspace/Server/basicI.cpp
In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-all.h:20,
from D:/QNX632/ide4-workspace/Server/basicC.h:35,
from D:/QNX632/ide4-workspace/Server/basicS.h:35,
from D:/QNX632/ide4-workspace/Server/basicI.h:34,
from D:/QNX632/ide4-workspace/Server/basicI.cpp:31:
C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file
D:/QNX632/ide4-workspace/Server/basicI.cpp: In member function virtual Widget* My_Factory_i::get_widget(const char*)': D:/QNX632/ide4-workspace/Server/basicI.cpp:47: warning: control reaches end of non-void function D:/QNX632/ide4-workspace/Server/basicI.cpp: In member function virtual char*
Widget_i::full_name()’:
D:/QNX632/ide4-workspace/Server/basicI.cpp:70: warning: control reaches end of
non-void function
D:/QNX632/ide4-workspace/Server/basicI.cpp: In member function virtual Double Widget_i::price()': D:/QNX632/ide4-workspace/Server/basicI.cpp:76: warning: control reaches end of non-void function C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include D:/QNX632/ide4-workspace/Server/basicS.cpp In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24, from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24, from C:/ACE_TAO_INCLUDE/ace/config-all.h:20, from D:/QNX632/ide4-workspace/Server/basicC.h:35, from D:/QNX632/ide4-workspace/Server/basicS.h:35, from D:/QNX632/ide4-workspace/Server/basicS.cpp:36: C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include D:/QNX632/ide4-workspace/Server/main.cpp In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24, from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24, from C:/ACE_TAO_INCLUDE/ace/config-all.h:20, from D:/QNX632/ide4-workspace/Server/basicC.h:35, from D:/QNX632/ide4-workspace/Server/basicS.h:35, from D:/QNX632/ide4-workspace/Server/basicI.h:34, from D:/QNX632/ide4-workspace/Server/main.cpp:7: C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file C:/QNX632/host/win32/x86/usr/bin/rm -f D:/QNX632/ide4-workspace/Server/x86/o/Server C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -lang-c++ -lang-c++ -oD:/QNX632/ide4-workspace/Server/x86/o/Server basicC.o basicI.o basicS.o main.o -L. -LC:/ACE_TAO_INCLUDE/lib -LC:/QNX632/target/qnx6/x86/lib/gcc/3.3.5 -LC:/QNX632/target/qnx6/x86/lib -LC:/QNX632/target/qnx6/x86/usr/lib -lACE -lTAO -lTAO_AnyTypeCode -lTAO_CodecFactory -lTAO_PI -lTAO_PortableServer -lTAO_Utils make[2]: Leaving directory D:/QNX632/ide4-workspace/Server/x86/o’
make -j 1 -Co-g -fMakefile all
make[2]: Entering directory D:/QNX632/ide4-workspace/Server/x86/o-g' C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86/o-g -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include -g -DVARIANT_g D:/QNX632/ide4-workspace/Server/basicC.cpp In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24, from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24, from C:/ACE_TAO_INCLUDE/ace/config-all.h:20, from D:/QNX632/ide4-workspace/Server/basicC.h:35, from D:/QNX632/ide4-workspace/Server/basicC.cpp:32: C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86/o-g -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include -g -DVARIANT_g D:/QNX632/ide4-workspace/Server/basicI.cpp In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24, from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24, from C:/ACE_TAO_INCLUDE/ace/config-all.h:20, from D:/QNX632/ide4-workspace/Server/basicC.h:35, from D:/QNX632/ide4-workspace/Server/basicS.h:35, from D:/QNX632/ide4-workspace/Server/basicI.h:34, from D:/QNX632/ide4-workspace/Server/basicI.cpp:31: C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file D:/QNX632/ide4-workspace/Server/basicI.cpp: In member function virtual Widget*
My_Factory_i::get_widget(const char*)’:
D:/QNX632/ide4-workspace/Server/basicI.cpp:47: warning: control reaches end of
non-void function
D:/QNX632/ide4-workspace/Server/basicI.cpp: In member function virtual char* Widget_i::full_name()': D:/QNX632/ide4-workspace/Server/basicI.cpp:70: warning: control reaches end of non-void function D:/QNX632/ide4-workspace/Server/basicI.cpp: In member function virtual Double
Widget_i::price()’:
D:/QNX632/ide4-workspace/Server/basicI.cpp:76: warning: control reaches end of
non-void function
C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86/o-g -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include -g -DVARIANT_g D:/QNX632/ide4-workspace/Server/basicS.cpp
In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-all.h:20,
from D:/QNX632/ide4-workspace/Server/basicC.h:35,
from D:/QNX632/ide4-workspace/Server/basicS.h:35,
from D:/QNX632/ide4-workspace/Server/basicS.cpp:36:
C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file
C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -ID:/QNX632/ide4-workspace/Server/x86/o -ID:/QNX632/ide4-workspace/Server/x86/o-g -ID:/QNX632/ide4-workspace/Server/x86 -ID:/QNX632/ide4-workspace/Server -IC:/ACE_TAO_INCLUDE -IC:/ACE_TAO_INCLUDE/TAO -IC:/QNX632/target/qnx6/usr/include -g -DVARIANT_g D:/QNX632/ide4-workspace/Server/main.cpp
In file included from C:/ACE_TAO_INCLUDE/ace/config-macros.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-lite.h:24,
from C:/ACE_TAO_INCLUDE/ace/config-all.h:20,
from D:/QNX632/ide4-workspace/Server/basicC.h:35,
from D:/QNX632/ide4-workspace/Server/basicS.h:35,
from D:/QNX632/ide4-workspace/Server/basicI.h:34,
from D:/QNX632/ide4-workspace/Server/main.cpp:7:
C:/ACE_TAO_INCLUDE/ace/config.h:1:32: warning: no newline at end of file
C:/QNX632/host/win32/x86/usr/bin/rm -f D:/QNX632/ide4-workspace/Server/x86/o-g/Server_g
C:/QNX632/host/win32/x86/usr/bin/qcc -V3.3.5,gcc_ntox86 -lang-c++ -lang-c++ -oD:/QNX632/ide4-workspace/Server/x86/o-g/Server_g basicC.o basicI.o basicS.o main.o -L. -LC:/ACE_TAO_INCLUDE/lib -LC:/QNX632/target/qnx6/x86/lib/gcc/3.3.5 -LC:/QNX632/target/qnx6/x86/lib -LC:/QNX632/target/qnx6/x86/usr/lib -lACE -lTAO -lTAO_AnyTypeCode -lTAO_CodecFactory -lTAO_PI -lTAO_PortableServer -lTAO_Utils -g
make[2]: Leaving directory D:/QNX632/ide4-workspace/Server/x86/o-g' make[1]: Leaving directory D:/QNX632/ide4-workspace/Server/x86’

If it works under QNX, why can’t you just build there? I know nothing of CORBA so I cannot help you directly but I had one special piece of code that would build succesfully under Windows and under Neutrino, but the Windows image would crash while the Neutrino image runs fine. But it could be anything. Specifically, if you are using UNIX like source distributions (TAR balls etc with configure scripts and the like), just build them under Neutrino.

Regards,
Albrecht

When transferring source code (build files, etc.) between Windows and QNX it is best to convert from DOS format (CR/LF) to QNX format (LF). Please see description of textto command.

Regards,
Yuriy

Hi,

There is a previous discussion about TAO at openqnx.com/index.php?name=P … ic&p=42801 , this can help you… for qcc/QCC use, I suggest you to use -Y parameter to determine that you are interested in GNU version of C/C++ libraries (see qcc documentation). I think you are interested in cross-compilation from windows host, and test/debug it on QNX target. For this, you can see Momentics documentation and use qconn. Move libraries previously compiled and link them with applications
requires that you use the same compiler version to avoid runtime problems.
I hope I have helped
Thanks