Dear All
I’m not able to link ‘vmesdklib.lib’ with my application code in QNX neutrino SP 3
make file is…
[b]OBJS=Write16.o
INCLUDES=
MISC=
LIBS=…/lib/vmesdklib.lib
CFLAGS=-c -T1 -M
LDFLAGS=-T1 -M
DEF= -D UNISDK_OS_QNX
IDIR=-I …/include
Write16: $(OBJS) $(LIBS)
cc $(IDIR) $(DEF) $(LDFLAGS) -l $(LIBS) -o Write16 $(OBJS)
Write16.o: Write16.c $(INCLUDES) $(MISC)
cc $(IDIR) $(DEF) $(CFLAGS) Write16.c
.PHONY: clean
clean:
rm Write16 $(OBJS)[/b]
while make this it shows the ‘vmesdklib.lib’ file not recognized or file format not recognized.
Please any one help me…
thanks…
micro
2
try using a link vmesdklib.so (.a??) and use
LIBS=vmesdklib
LIBDIR=…/lib
-l $(LIBS) -L $(LIBDIR)
i think ld just checks for .so and .a, dunno if the full name is given it also just checks for vmesdklib.lib(.so/.a)
mario
3
The file name also gets prefix with lib automaticaly ( i don’t know if this can be turned of )
if you specify LIBS=vmesdk, the real filename should be libvmesdk.a
micro,
I tried with vmesdklib.so and vmesdklib.a it shows error
qcc -I …/include -D UNISDK_OS_QNX -o QNXVMEUtility QNXVMEUtility.o vmesdklib.so
vmesdklib.so: file not recognized: File format not recognized
The vmesdklib.lib created in QNX 4. is any other way to link…
thanks…
mario
5
created in QNX4 ?? You cannot use librairies created in QNX4 in QNX6.
in the command line that you specified you need to put a -l in fron of the library name otherwise the linker thinks it’s an .o ( object ) file.