Jump to ID:
Core Development Tools

Project Home

Documents

Source Code

Discussions

Wiki

Project Info
Forum Topic - Linking Errors: Page 1 of 8 (8 Items)
   
 
 
Linking Errors  
This is my first posting on this forum and I'm newbie to QNX development. I'm developing drivers and application for QNX
 6.4.1 target system and using QNX6.5 IDE.
I'm able to complie, link and run a simple program on the target.  I can compile my code to get the object files IP330.o
,IP480.o, IPTest.o,   apc8620.o but I'm getting linking problem during building the project. 

common.mk :

# This is an automatically generated record.
# The area between QNX Internal Start and QNX Internal End is controlled by
# the QNX IDE properties.

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

#===== USEFILE - the file containing the usage message for the application. 
USEFILE=

# Next lines are for C++ projects only

EXTRA_SUFFIXES+=cxx cpp

#===== LDFLAGS - add the flags to the linker command line.
LDFLAGS+=-lang-c++ -l

VFLAG_g=-gstabs+

#===== EXTRA_LIBVPATH - a space-separated list of directories to search for library files.
EXTRA_LIBVPATH+=$(PROJECT_ROOT_apc8620_lib)/$(CPU)/$(patsubst o%,a%,$(notdir $(CURDIR)))  \
	$(PROJECT_ROOT_apc8620_lib)/$(CPU)/$(patsubst o%,so%,$(notdir $(CURDIR)))

#===== CCFLAGS - add the flags to the C compiler command line. 
CCFLAGS+=-w

include $(MKFILES_ROOT)/qmacros.mk


ifndef QNX_INTERNAL
QNX_INTERNAL=$(PROJECT_ROOT)/.qnx_internal.mk
endif
include $(QNX_INTERNAL)

include $(MKFILES_ROOT)/qtargets.mk

OPTIMIZE_TYPE_g=none
OPTIMIZE_TYPE=$(OPTIMIZE_TYPE_$(filter g, $(VARIANTS)))


Console Output:

/opt/qnx650/host/linux/x86/usr/bin/make -k CPULIST=x86 all --file=/tmp/QMakefile132138304544122139.tmp 
/opt/qnx650/host/linux/x86/usr/bin/make -j 1 -Cx86 -fMakefile all
make[1]: Entering directory `/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86'
/opt/qnx650/host/linux/x86/usr/bin/make -j 1 -Co -fMakefile all 
make[2]: Entering directory `/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o'
/bin/rm -f  /usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o/courier
/opt/qnx650/host/linux/x86/usr/bin/qcc -Vgcc_ntox86  -lang-c++ -l    -o/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace
/courier/x86/o/courier    IP330.o    IP480.o    IPTest.o    apc8620.o   -L . -L /x86/a -L /x86/so -L /opt/qnx650/target/
qnx6/x86/lib -L /opt/qnx650/target/qnx6/x86/usr/lib  -Wl,--rpath-link . -Wl,--rpath-link /x86/a -Wl,--rpath-link /x86/so
 -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/lib -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/usr/lib      
make[2]: Leaving directory `/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o'
/opt/qnx650/host/linux/x86/usr/bin/make -j 1 -Co-g -fMakefile all
make[2]: Entering directory `/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o-g'
/bin/rm -f  /usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o-g/courier_g
/opt/qnx650/host/linux/x86/usr/bin/qcc -Vgcc_ntox86  -lang-c++ -l    -o/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace
/courier/x86/o-g/courier_g    IP330.o    IP480.o    IPTest.o    apc8620.o   -L . -L /x86/a-g -L /x86/so-g -L /opt/qnx650
/target/qnx6/x86/lib -L /opt/qnx650/target/qnx6/x86/usr/lib  -Wl,--rpath-link . -Wl,--rpath-link /x86/a-g -Wl,--rpath-
link /x86/so-g -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/lib -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/usr/lib    
-g     
/opt/qnx650/host/linux/x86/usr/bin/ntox86-ld: cannot find -l-o/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/
x86/o/courier
cc: /opt/qnx650/host/linux/x86/usr/bin/ntox86-ld error 1
make[2]: *** [/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o/courier] Error 1
make[2]: Target `all' not remade because of errors.
make[1]: [all] Error 2 (ignored)
/opt/qnx650/host/linux/x86/usr/bin/ntox86-ld: cannot find -l-o/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/
x86/o-g/courier_g
cc: /opt/qnx650/host/linux/x86/usr/bin/ntox86-ld error 1
make[2]: *** [/usr0/home/skatta/QNX_Workspace/ide-4.7-workspace/courier/x86/o-g/courier_g] Error 1
make[2]:...
View Full Message