Home Bug Reports

slice2freeze generating include path is error

when I use slice2freeze to generate map file. but it's include file has include path. I think it's error.

I use automake and autoconf to build my system.
my ice file in $(top_srcdir)/slice/phonelist.ice
and I generate file include header and cpp locate in $(top_srcdir)/src/web

when I build it , I create a build directory to build it.
this is my command:

slice2freeze -I/opt/ice/slice -I../../../pnote_db/src/web --dict \
phonelistMap,string,pnote::GroupList phonelistMap \
../../../pnote_db/slice/phonelist.ice --output-dir ../../../pnote_db/src/web

It will generate 2 file -> phonelistMap.h and phonelistMap.cpp in ../../../pnote_db/src/web

but in phonelistMap.h file ,it include the following path in include


#include <Freeze/Map.h>
#include <../../../pnote_db/slice/phonelist.h>

in phonelistMap.cpp file ,it include the following path in include

#include <Ice/BasicStream.h>
#include <../../../pnote_db/src/web/phonelistMap.h>

then g++ can't find phonelist.h,I don't want it generate path in include ,just like these

in phonelistMap.h
#include <Freeze/Map.h>
#include <phonelist.h>
in phonelistMap.cpp
#include <Ice/BasicStream.h>
#include <phonelistMap.h>

How can I set compile parameter to comiple file like that.

thanks

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Try the following:

    slice2freeze -I/opt/ice/slice -I../../../pnote_db/src/web --dict \
    phonelistMap,string,pnote::GroupList phonelistMap \
    -I../../../pnote_db/slice phonelist.ice --output-dir ../../../pnote_db/src/web
  • dragzhbdragzhb Member ✭✭
    It's fine ,thanks.
    But phonelist.ice must set the full path,if not, slice2freez2 will report can't find phonelist.ice file. the command like this:

    slice2freeze -I/opt/ice/slice -I../../../pnote_db/src/web --dict \
    phonelistMap,string,pnote::GroupList phonelistMap \
    -I../../../pnote_db/slice ../../../pnote_db/slice/phonelist.ice --output-dir ../../../pnote_db/src/web
Sign In or Register to comment.