Build by using ./build_ps.sh, but occur an error: " undefined reference to 'CreateServerNode(int,char **)' ".How can I fix it?
weihaoxie opened this issue · 1 comments
make: Leaving directory /home/cxxnet-master/ps-lite' g++ -DMSHADOW_FORCE_STREAM -Wall -g -O3 -I./mshadow/ -I./dmlc-core/include -fPIC -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -I/usr/local/cuda-7.0/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=1 -std=c++11 -I./ps-lite/src -I./ps-lite/third_party/include -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_GLOG=1 -DCXXNET_USE_OPENCV=1 -DCXXNET_USE_OPENCV_DECODER=1 -fopenmp -o bin/cxxnet.ps layer_cpu.o updater_cpu.o nnet_cpu.o main.o nnet_ps_server.o data.o layer_gpu.o updater_gpu.o nnet_gpu.o dmlc-core/libdmlc.a ps-lite/build/libps.a -pthread -lm -lcudart -lcublas -lcurand -L/usr/local/cuda-7.0/lib64 -lopenblas -lrt
pkg-config --libs opencv-ljpeg ./ps-lite/deps/lib/libprotobuf.a ./ps-lite/deps/lib/libglog.a ./ps-lite/deps/lib/libgflags.a ./ps-lite/deps/lib/libzmq.a ./ps-lite/deps/lib/libcityhash.a ./ps-lite/deps/lib/liblz4.a ps-lite/build/libps.a(ps_main.o): In function
ps::App::Create(int, char**)':
/home/cxxnet-master/ps-lite/src/ps_main.cc:7: undefined reference to `CreateServerNode(int, char**)'
collect2: error: ld returned 1 exit status
make: *** [bin/cxxnet.ps] Error 1
I add code as follows into "ps.h" and it generates "cxxnet.ps" without a hitch,but I don't know if it will be feasible.
typedef float Val;
int CreateServerNode(int argc, char *argv[]) {
ps::OnlineServer server;
return 0;
}
I had the same error.But i don't know how to solve this problem.