[omniORB] Visual C++ .NET 7.1 compilation
Lolke B. Dijkstra
omniorb at dijkstra-ict.com
Fri Nov 18 13:11:15 GMT 2005
Lolke B. Dijkstra wrote:
> Hi,
>
> I am just getting started and followed the instructions in the
> readme.win32
>
> Compiling the examples with nmake
> =================================
>
> The compilation fails :
>
> "making" all in thread...
> cl /nologo /c -O2 -MD -GX -D__WIN32__ -D__x86__ -D__NT__
> -D__OSVERSION__=4 -I. -I..\..\..\include /Tpdiner.cc
> diner.cc
> diner.cc(46) : fatal error C1083: Cannot open include file:
> 'iostream.h': No such file or directory
> NMAKE : U1077: 'cl' : return code '0x2'
> Stop.
> NMAKE : U1077: '"C:\Program Files\Microsoft Visual Studio .NET
> 2003\VC7\BIN\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> .NET 2003\VC7\BIN\nmake.exe"' : return code '0x2'
> Stop.
>
>
> This is due to the include of iostream.h. Inspection of the file shows
> that the macro HAVE_STD should be known by the system.
>
> 1. There does not seem to be a global include that allows you to set
> the macros for compilation. So how should this be done?
> 2. What other macros need setting?
>
> Kind regards,
> Lolke
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
>
> __________ NOD32 1.1290 (20051117) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
Hi again,
I found some remedies to the above. I changed the .mak file.
For instance I noticed there was a reference to omnithread30.lib which
is not there I changed it to omnithread31.lib. Further I added HAVE_STD
Similar fixes are needed to the respective .mak files in other subdirs.
Cheers,
Lolke
The changed mak file is down here:
#
# Usage:
# nmake /f dir.mk [<build option>]
#
# <build option>:
# all - build all executables
# clean - delete all executables and obj files
# veryclean - clean plus delete all stub files generated by omniidl2
#
#
# Pre-requisite:
#
# Make sure that you have environment variable LIB and INCLUDE setup for
# using Developer studio from the command line. Usually, this is
accomplished
# by source the vcvars32.bat file.
#
# Where is the top of this distribution. All executable, library and include
# directories are relative to this variable.
#
TOP = ..\..\..
##########################################################################
# Essential flags to use omnithread
#
DIR_CPPFLAGS = -I. -I$(TOP)\include
#
#
THREAD_CPPFLAGS = -D__WIN32__ -D__x86__ -D__NT__ -D__OSVERSION__=4
-DHAVE_STD
THREAD_LIB = omnithread31_rt.lib -libpath:$(TOP)\lib\x86_win32
CXXFLAGS = -O2 -MD -GX $(THREAD_CPPFLAGS) $(DIR_CPPFLAGS)
CXXLINKOPTIONS =
.SUFFIXES: .cc
.cc.obj:
cl /nologo /c $(CXXFLAGS) /Tp$<
########################################################################
# To build debug executables
# Replace the above with the following:
#
#THREAD_CPPFLAGS = -D__WIN32__ -D__x86__ -D__NT__ -D__OSVERSION__=4
-DHAVE_STD
#THREAD_LIB = omnithread31_rtd.lib -libpath:$(TOP)\lib\x86_win32
#CXXFLAGS = -MDd -GX -Z7 -Od $(THREAD_CPPFLAGS) $(DIR_CPPFLAGS)
#CXXLINKOPTIONS = -debug -PDB:NONE
all:: diner.exe prio.exe thrspecdata.exe prodcons.exe
diner.exe: diner.obj
link -nologo $(CXXLINKOPTIONS) -out:$@ $** $(THREAD_LIB)
prio.exe: prio.obj
link -nologo $(CXXLINKOPTIONS) -out:$@ $** $(THREAD_LIB)
thrspecdata.exe: thrspecdata.obj
link -nologo $(CXXLINKOPTIONS) -out:$@ $** $(THREAD_LIB)
prodcons.exe: prodcons.obj
link -nologo $(CXXLINKOPTIONS) -out:$@ $** $(THREAD_LIB)
clean::
-del *.obj
-del *.exe
veryclean::
-del *.obj
-del *.exe
More information about the omniORB-list
mailing list