C++ C++;类声明并在gsoap项目中包含问题
我使用以下命令在gsoap项目中编译一个文件。C++ C++;类声明并在gsoap项目中包含问题,c++,namespaces,declaration,gsoap,C++,Namespaces,Declaration,Gsoap,我使用以下命令在gsoap项目中编译一个文件。 在我的项目中几乎所有文件都是由GSOAP工具生成的,而我是C++新手,所以我不能很好地讲述它。 总之,我需要了解我的项目是否可以编译。我需要其他旗帜吗 gcc -c -I/usr/include/gsoap soapAuftraegeImportSoap11BindingProxy.cpp 当前错误为: soapAuftraegeImportSoap11BindingProxy.cpp:10: error: 'AuftraegeImportSo
在我的项目中几乎所有文件都是由GSOAP工具生成的,而我是C++新手,所以我不能很好地讲述它。 总之,我需要了解我的项目是否可以编译。我需要其他旗帜吗
gcc -c -I/usr/include/gsoap soapAuftraegeImportSoap11BindingProxy.cpp
当前错误为:
soapAuftraegeImportSoap11BindingProxy.cpp:10: error: 'AuftraegeImportSoap11BindingProxy' has not been declared
第10行是:
AuftraegeImportSoap11BindingProxy::AuftraegeImportSoap11BindingProxy()
该文件以以下内容开头:
#include "soapAuftraegeImportSoap11BindingProxy.h"
但是在头文件中没有类的声明。没有别的地方。另请参见其他错误:
SOAPAUFTRAEGEMPORTSOAP11BindingProxy.cpp:10:错误:“AUFTRAEGEMPORTSOAP11BindingProxy”尚未声明
SoaAufTraceGeIppsApp11bdIdGraveCopy.CPP:10:错误:ISO C++禁止声明“AffTraceEngIsApp11bButdIn代理”,没有类型
soapAuftraegeImportSoap11BindingProxy.cpp:在函数“int AuftraegeImportSoap11BindingProxy()”中:
SOAPAUFTRAEGEMPORTSOAP11BindingProxy.cpp:11:错误:“AUFTRAEGEMPORTSOAP11BindingProxy_init”未在此作用域中声明
soapAuftraegeImportSoap11BindingProxy.cpp:在全局范围内:
SOAPAUFTRAEGEMPORTSOAP11BindingProxy.cpp:14:错误:“AUFTRAEGEMPORTSOAP11BindingProxy”不是类或命名空间
希望我的问题对你有意义 为了结束这个问题,我发布了我的makefile
C=g++
CCPLUS=g++
CFLAGS=-c #-Wall
### gsoap
INCL=-I/usr/include/gsoap
LIBS= -L/usr/lib/gsoap
LINK= -lgsoap -lgsoap++ -lgsoapck -lgsoapck++ -lgsoapssl -lgsoapssl++
OLINK= -lgsoap++
#OBJ=soapServer.o soapServerLib.o soapC.o
.SUFFIXES: .o .cpp
.cc.o:
@rm -f $@
$(CC) $(CFLAGS) $(INCL) $(INC) $<
.cpp.o:
@rm -f $@
$(CC) $(CFLAGS) $(INCL) $(INC) $<
default: client
clean:
rm -r *.o
cleanall:
rm soap* *.xml *.nsmap *.h *.cgi
default: all
all: client server
client: KundenWebServiceClient
server: KundenWebServiceServer
cp KundenWebServiceServer /usr/lib/cgi-bin/
proxy: KundenWebService.h
soapcpp2 -x -L -C -i -I/usr/include/gsoap KundenWebService.h
rm *12*
service: KundenWebService.h
soapcpp2 -x -L -S -i -I/usr/include/gsoap KundenWebService.h
rm *12*
KundenWebService.h: KundenWebService.wsdl
wsdl2h KundenWebService.wsdl
###
KundenWebServiceClient: KundenWebServiceClient.o soapKundenWebServiceSoap11BindingProxy.o soapC.o getrow.o
$(CC) -o KundenWebServiceClient KundenWebServiceClient.o soapKundenWebServiceSoap11BindingProxy.o soapC.o getrow.o $(LIBS) $(OLINK)
KundenWebServiceServer: KundenWebServiceServer.o soapKundenWebServiceSoap11BindingService.o soapC.o
$(CC) -o KundenWebServiceServer KundenWebServiceServer.o soapKundenWebServiceSoap11BindingService.o soapC.o $(OLINK)
C=g++
CCPLUS=g++
CFLAGS=-c#Wall
###gsoap
INCL=-I/usr/include/gsoap
LIBS=-L/usr/lib/gsoap
LINK=-lgsoap-lgsoap++-lgsoapck-lgsoapck++-lgsoapssl-lgsoapssl++
OLINK=-lgsoap++
#OBJ=soapServer.o soapServerLib.o soapC.o
.后缀:.o.cpp
.cc.o:
@rm-f$@
$(CC)$(CFLAGS)$(包括)$(INC)$<
.cpp.o:
@rm-f$@
$(CC)$(CFLAGS)$(包括)$(INC)$<
默认值:客户端
清洁:
rm-r*.o
清洁所有:
rm soap**.xml*.nsmap*.h*.cgi
默认值:全部
全部:客户端服务器
客户:KundenWebServiceClient
服务器:KundenWebServiceServer
cp KundenWebServiceServer/usr/lib/cgi-bin/
代理:KundenWebService.h
soapcpp2-x-L-C-i-i/usr/include/gsoap-KundenWebService.h
rm*12*
服务:KundenWebService.h
soapcpp2-x-L-S-i-i/usr/include/gsoap-KundenWebService.h
rm*12*
h:KundenWebService.wsdl
wsdl2h KundenWebService.wsdl
###
KundenWebServiceClient:KundenWebServiceClient.o soapKundenWebServiceSoap11BindingProxy.o soapC.o getrow.o
$(CC)-o KundenWebServiceClient KundenWebServiceClient.o soapKundenWebServiceSoap11BindingProxy.o soapC.o getrow.o$(LIBS)$(OLINK)
KundenWebServiceServer:KundenWebServiceServer.o soapKundenWebServiceSoap11BindingService.o soapC.o
$(CC)-o KundenWebServiceServer KundenWebServiceServer.o soapKundenWebServiceSoap11BindingService.o soapC.o$(OLINK)
您是否构建并安装了库?