unressolved symbols

Hi,

could somebody help me–

i have compiled my shared library in QNX6.2NC
it has “throw” and it cannot resolve symbols:
__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b0i0
_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b0i0

i see in libstdc++.a – it contains
__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b1i0
_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b1i0
(last 3 bytes are 1i0 instead of 0i0)

where is my mistake?


Thanks
vasilii

What compile line did you use?

Kris

“vasilii” <vv40in@rambler.ru> wrote in message
news:ah63f0$473$1@inn.qnx.com

Hi,

could somebody help me–

i have compiled my shared library in QNX6.2NC
it has “throw” and it cannot resolve symbols:

__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b0i0

_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b0i0

i see in libstdc++.a – it contains

__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b1i0

_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b1i0
(last 3 bytes are 1i0 instead of 0i0)

where is my mistake?


Thanks
vasilii

\

What compile line did you use?

i am using qnx makefiles.


Kris

“vasilii” <> vv40in@rambler.ru> > wrote in message
news:ah63f0$473$> 1@inn.qnx.com> …
Hi,

could somebody help me–

i have compiled my shared library in QNX6.2NC
it has “throw” and it cannot resolve symbols:


__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b0i0


_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b0i0

i see in libstdc++.a – it contains


__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b1i0


_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b1i0
(last 3 bytes are 1i0 instead of 0i0)

where is my mistake?


Thanks
vasilii



\

If you do a ‘make CCOPTS+=-lang-c++’ on your project does it still complain?

What compile line did you use?

i am using qnx makefiles.


Kris

“vasilii” <> vv40in@rambler.ru> > wrote in message
news:ah63f0$473$> 1@inn.qnx.com> …
Hi,

could somebody help me–

i have compiled my shared library in QNX6.2NC
it has “throw” and it cannot resolve symbols:



__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b0i0



_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b0i0

i see in libstdc++.a – it contains



__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b1i0



_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b1i0
(last 3 bytes are 1i0 instead of 0i0)

where is my mistake?


Thanks
vasilii





\

If you do a ‘make CCOPTS+=-lang-c++’ on your project does it still
complain?

it is default (i see this line during compiling)

Hi Vasilii…

Are you mixing c and c++? I get unresolved symbols sometimes when I
instantiate a c++ object within a main.c. If you are mixing c/c++, are
you using templates?

You may want to post your common.mk file.

Regards…

miguel.


vasilii wrote:

Hi,

could somebody help me–

i have compiled my shared library in QNX6.2NC
it has “throw” and it cannot resolve symbols:
__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b0i0
_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b0i0

i see in libstdc++.a – it contains
__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b1i0
_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b1i0
(last 3 bytes are 1i0 instead of 0i0)

where is my mistake?


Thanks
vasilii


\

Miguel,

Are you mixing c and c++? I get unresolved symbols sometimes when I
instantiate a c++ object within a main.c. If you are mixing c/c++, are
you using templates?

no. there are only *.cc files

You may want to post your common.mk file.

the follwing is my common.mk

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)
EXTRA_SUFFIXES += cpp CPP CC
CCFLAGS += -fPIC
LDFLAGS += -fPIC -fexceptions
LIBS += socket
include $(MKFILES_ROOT)/qmacros.mk
SRCVPATH += $(PRODUCT_ROOT)
include $(MKFILES_ROOT)/qtargets.mk


note:
line
LDFLAGS += -fexceptions
does not any influence too (i tryed w/o this one)


Thanks
vasilii

i found those symboles in
/usr/lib/libstdc++.so.2.10
!!!

in why manner i can link with this lib
instead of default /lib/libcpp.so.2 ?


Thanks
vasilii

sounds like you are mixing up the free gnu c++ libs and the non-free
dinkum c++ libs.

vasilii <vv40in@rambler.ru> wrote:

Hi,

could somebody help me–

i have compiled my shared library in QNX6.2NC
it has “throw” and it cannot resolve symbols:
__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b0i0
_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b0i0

i see in libstdc++.a – it contains
__16invalid_argumentRCt12basic_string3ZcZt18string_char_traits1ZcZt24__defau
lt_alloc_template2b1i0
_13runtime_errorRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default
alloc_template2b1i0
(last 3 bytes are 1i0 instead of 0i0)

where is my mistake?


Thanks
vasilii

sounds like you are mixing up the free gnu c++ libs and the non-free
dinkum c++ libs.

may be. how to avoid it?

\

Thanks
vasilii

Hi Vasilii…

vasilii wrote:

i found those symboles in
/usr/lib/libstdc++.so.2.10
!!!

in why manner i can link with this lib
instead of default /lib/libcpp.so.2 ?

I think that the libraries are automatically included for you, but…

Notice that you have .cc files, these are indeed c++ files, even if you
have no c++ code per say (i.e. classes, templates, etc). You may want
to include the following in the common.mk file:

CC_nto_x86_gcc_qcc = QCC -Vgcc_ntox86 -c

If you have code in other directories, then use

EXTRA_INCVPATH += $(my_dir_inc)
EXTRA_SRCVPATH += $(my_dir_src)

if you have libraries, then add

LIBS+= my_lib

Notice that some libraries are included automatically such as the math
libraries.

Try these things, and see what happens. Post results so that others may
be able to help.

Regards…

Miguel.




Thanks
vasilii

Hi Vasilii…

vasilii wrote:

sounds like you are mixing up the free gnu c++ libs and the non-free
dinkum c++ libs.


may be. how to avoid it?

You may not have an option.

You indicated that you are using rtp6.2-NC, and it is my understanding
that the NC edition only includes the free GNU libraries. In any case,
see a previous post, and try some of the suggestions already indicated.
If you have your common.mk file setup correctly, you should not have
any problems. Here is a common.mk file that I use as a reference (of
course you will have to change a number of things to fit your needs).
With this common.mk I compile mixed c/c++ programs.

Regards…

Miguel.

/home/dev/src / heli / cand / server

~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~

DEV_BASE_HOME / DEV_PRODUCT_NAME/DEV_PROJECT_NAME / DEV_MK_NAME

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DEV_PRODUCT_HOME

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DEV_PROJECT_HOME

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

\

-------------- Pre-set macros go here --------------------------

#executable name is: $(DEV_PROJECT_NAME)$(DEV_NAME_SUFFIX)

for example: DEV_PROJECT_NAME = cand, DEV_NAME_SUFFIX = _s

then, executable name = cand_s

DEV_NAME_SUFIX = _s

------------- other specific defines --------------------------

DEV_BASE_HOME
= /home/dev/src
DEV_PRODUCT_NAME = heli
DEV_PROJECT_NAME = cand
DEV_MK_NAME = server

DEV_USE_FILE_NAME = useage.use
DEV_INSTALL_DIR = dev/bin

#--------------------- Include Path --------------------------------

DEV_COMMON_INCLUDE = $(DEV_BASE_HOME)/common/include
DEV_PRODUCT_HOME = $(DEV_BASE_HOME)/$(DEV_PRODUCT_NAME)
DEV_PROJECT_HOME = $(DEV_PRODUCT_HOME)/$(DEV_PROJECT_NAME)

DEV_DEV_INC = $(DEV_BASE_HOME)/utilities/devset/include
DEV_DEV_SRC = $(DEV_BASE_HOME)/utilities/devset/src

DEV_VMIC_INC = $(DEV_BASE_HOME)/utilities/vmic/include
DEV_VMIC_SRC = $(DEV_BASE_HOME)/utilities/vmic/src

DEV_CAN_INC = $(DEV_BASE_HOME)/utilities/can/include
DEV_CAN_SRC = $(DEV_BASE_HOME)/utilities/can/src


#------------------------ C Flags ---------------------------------

CXX = QCC
CCFLAGS += -Wno-reorder
#LDFLAGS += -lrpc

CC_nto_x86_gcc_qcc = QCC -Vgcc_ntox86 -c
EXTRA_INCVPATH += $(DEV_PROJECT_HOME)/include $(DEV_COMMON_INCLUDE)
$(DEV_DEV_INC) $(DEV_VMIC_INC) $(DEV_CAN_INC)
EXTRA_SRCVPATH += $(DEV_PROJECT_HOME)/src $(DEV_DEV_SRC)
$(DEV_VMIC_SRC) $(DEV_CAN_SRC)

\

------------- name + install directory ----------------------------

USEFILE= $(DEV_PROJECT_HOME)/$(DEV_MK_NAME)/$(DEV_USE_FILE_NAME)
INSTALLDIR = $(DEV_INSTALL_DIR)
NAME = $(DEV_PROJECT_NAME)$(DEV_NAME_SUFIX)

------------- post-set macros go here ----------------------------

include $(MKFILES_ROOT)/qtargets.mk

VFLAG_g = -gdwarf-2





Thanks
vasilii