Hi,
I have a CAN.a file and 4 Header Files. I made a QNX C/C++ Project and inluded the 4 Header Files. But now I get an error:
CANSendUser.o: In function main': CANSendUser.o(.text+0x50): undefined reference to
ConnectDriver(unsigned char, char *)’
CANSendUser.o(.text+0x50): relocation truncated to fit: R_PPC_REL24 ConnectDriver(unsigned char, char *)
CANSendUser.o(.text+0x80): undefined reference to CanGetStatus(int, status *)' CANSendUser.o(.text+0x80): relocation truncated to fit: R_PPC_REL24 CanGetStatus(int, status *) CANSendUser.o(.text+0x9c): undefined reference to
CanWakeUp(int)’
CANSendUser.o(.text+0x9c): relocation truncated to fit: R_PPC_REL24 CanWakeUp(int)
CANSendUser.o(.text+0x140): undefined reference to `CanWrite(int, can_object *)’
CANSendUser.o(.text+0x140): relocation truncated to fit: R_PPC_REL24 CanWrite(int, can_object *)
…
How can I tell the IDE to use the CAN.a API file, too.
thx in advance
Gonzo
I tried to include the CAN.a in the common.mk file, her is my file, the MYLIB part is what I add:
# 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++
VFLAG_g=-gstabs+
#===== LIBS - a space-separated list of library items to be included in the link.
LIBS+=c socket
MYLIB=C:/QNX630/target/qnx6/DACHS-MSCAN/DACHS-MSCAN-Total5200-API-1.0.1-NTO6.3/src/CAN.a
include $(MKFILES_ROOT)/qmacros.mk $(MYLIB)
If I rebuild my project an error occurs
C:/QNX630/target/qnx6/DACHS-MSCAN/DACHS-MSCAN-Total5200-API-1.0.1-NTO6.3/src/CAN.a:1: *** missing separator. Stop.
What did I wrong?
Is it the right way to include a .a file?
Gonzo