Archived

This forum has been archived. Please start a new discussion on GitHub.

ice 3.2 compilation with VC7.1

I am getting a problem in trying to compile ice.

I set up my compiler as explained in Make.rules.mak
I also set up the BZIP2_HOME, DB_HOME ... of the Make.rules file with the directories where I installed the third party softwares.

But when I launch Ice compilation, I got an compiler error telling me that it can not find the include files of my third party softwares.

I checked it out and it looks like the BZIP2_HOME, DB_HOME... variables I defined in Make.rules are simply not taken into consideration compilation process.

I am not very familiar with the makefile mechanism, so I am wondering if I did not miss any other configuration somewhere. :confused:

Then I tried to set manually the INCLUDE and LIB environment variable of windows with my third party softwares respective directories. In this way it is compiling. but I have to say it is not really what I want, I would prefer to be able to use the BZIP2_HOME, DB_HOME... variables to do not pollute the windows environment variables.

Comments

  • If you are building in a Visual Studio command prompt window, the following works:

    > set DB_HOME=C:\Ice-3.2.0-ThirdParty-VC80\lib

    assuming that you have installed the third-party libraries in that directory.
    Set the other variables the same way, then

    nmake -f Makefile.mak

    should do the right thing.

    Cheers,

    Michi.
  • This method does not seems to work either.
    Let me give you a bit more of details.

    First, I actually installed all third party softwares from source and compiled them by myself, so they are all in different directories.

    Now, if i go to the file config/Make.rules, I have set up the variable like this:

    BZIP2_HOME =../bzip2
    DB_HOME =../db-4.5.20.NC
    EXPAT_HOME = ../Expat-2.0.0
    OPENSSL_HOME = ../openssl-0.9.8d



    If I look a bit further to the file config/Make.rules, I can see that you are checking if the "HOME" variables are set up in order to add the -I and -L options when compiling, for example for bzip2:

    BZIP2_FLAGS = $(if $(BZIP2_HOME),-I$(BZIP2_HOME)/include)
    BZIP2_LIBS = $(if $(BZIP2_HOME),-L$(BZIP2_HOME)/$(libsubdir)) -lbz2
    BZIP2_RPATH_LINK = $(if $(BZIP2_HOME),$(call rpathlink,$(BZIP2_HOME)/$(libsubdir)))


    So, I am trying to compile like this but i get the compiler error:

    cl.exe /c -I.. -nologo -W3 -WX -GR -EHsc -FD -D_CONSOLE -MDd -Zi -Gm -O
    d -D_DEBUG -GZ -I..\..\include -DICE_API_EXPORTS -DFD_SETSIZE=1024 -DWIN32_LEAN_
    AND_MEAN ConnectionI.cpp
    ConnectionI.cpp
    ConnectionI.cpp(28) : fatal error C1083: Cannot open include file: 'bzlib.h': No
    such file or directory

    As you can see, then "-I$(BZIP2_HOME)/include" does not figure inside so obviously it did not recognise that I defined the BZIP2_HOME.

    Now I tried with the set as michi said but it does not change anything.
  • dwayne
    dwayne St. John's, Newfoundland
    The Windows build system expects all third-party software packages to be located in the same directory. This location is specified by the THIRDPARTY_HOME variable which you can either set in your environment or just set in config/Make.rules.mak. Note that it is Make.rules.mak, not Make.rules which is used for unix builds.

    So if you are building all the third-party code from source yourself you will need to install them all in a common directory. However it would be much easier if you just installed the precompiled third-party package for VC7.1 that we supply on our download page.