Hi All,
if I want to make a .a static header and include a header call from within a header I get an "No such file or directory" error. Unless I use the full path within the header. It works fine with a standard non libray build. I'm working with soap internet comms. I have two folders for source code, one holding my control code one the soap stubs for the xml code. In my control code if I do a library build and don't include full paths to stubs headers I get an error. eg
Code:
#include "soapERSWSExternalClientServiceImplServiceSoapBindingProxy.h"
error
Code:
#include "../QR/soapERSWSExternalClientServiceImplServiceSoapBindingProxy.h"
works
I am setting my includes in my makefile, it's as if when using a library makefile it just forgets to use the paths?
so my directory is as follows
|
|
-------------lib (source control files directory )
|
|
--------------| QR directory ( project name )
|
|
---------makefile
|
---------stubs directory ( sopa xml files for comms )
Am I just making a stupid mistake or need full paths set if a header includes a header?
My lib make is below. Thanks
Code:
TRGT =
CC = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
BIN = $(CP) -O binary
AR = $(TRGT)ar
# List all debug C defines here ok needed
DDEFS =-DWITH_NONAMESPACES -DWITH_OPENSSL
DINCDIR = -Istubs/ -I../lib
PRODUCT_LIBS = -lpthread -lssl -lcrypto -lssl
CPPFLAGS = -Wall -pedantic -g -std=c++11
PROGRAM = Test
LIBRARY_DIRECTORY =../lib/
COMMON_DIRECTORY =../CommonFiles/
SOURCE_DIRECTORY =source/
STUBS_DIRECTORY =stubs/
##just so I get a second try at path
IFLAGS = -I$(STUBS_DIRECTORY)
#files to compile first two lines always needed, so need to use wsdl2h and then soapcpp to pul and compile stubs
objects = $(LIBRARY_DIRECTORY)QR_Control_Class.o\
$(LIBRARY_DIRECTORY)stdsoap2.o\
$(STUBS_DIRECTORY)soapC.o\
$(STUBS_DIRECTORY)soapERSWSExternalClientServiceImplServiceSoapBindingProxy.o\
$(LIBRARY_DIRECTORY)File_Control_Class.o
#Pattern rule to generate an object file from a 'C' file
%.o : %.c
$(CC) -c $(IFLAGS) $(DINCDIR) $(CPPFLAGS) $(DDEFS) $(PRODUCT_LIBS) $< -o $@
libfiles.a: $(objects)
$(AR) -rs libsoapfiles.a $(objects)