Jump to content

Parameters For Compiling Mith Nmake


kroko

Recommended Posts

Only a 'simple' question using the HDK (under Windows). What are the command line options for compiling with nmake? I can't find any example.

nmake ... SOP_Parent.c ???

Excuse me but I have no experience with the nmake-utility...

Thanks kroko - a newbie

Link to comment
Share on other sites

I just tried this and here's what I found.

First, the Makefile.win file is missing the system includes. So you need to first modify it to include the PlatformSDK stuff like so:

SYSLIBINC = -LIBPATH:$(MSVCDir)/lib -LIBPATH:$(MSVCDir)/PlatformSDK/lib
INCINC = $(INCDIRS) -I$(HFS)/toolkit/include -I$(HFS)/custom/include -I$(MSVCDir)/include -I$(MSVCDir)/PlatformSDK/include

So now where you have your HDK file, you need to create a file named Makefile with something like this:

DSONAME = SOP_Star.dll
SOURCES = SOP_Star.C
!INCLUDE $(HFS)/toolkit/makefiles/Makefile.nmake

Now to compile, you can just invoke nmake with no command line arguments:

nmake

You probably want to modifiy Makefile.win so that it copies the created .dll to $HOME/houdini8.0/dso as well though or else you will have to manually do this after compiling for Houdini to pick it up.

Link to comment
Share on other sites

I just tried this and here's what I found.

First, the Makefile.win file is missing the system includes. So you need to first modify it to include the PlatformSDK stuff like so:

SYSLIBINC = -LIBPATH:$(MSVCDir)/lib -LIBPATH:$(MSVCDir)/PlatformSDK/lib
INCINC = $(INCDIRS) -I$(HFS)/toolkit/include -I$(HFS)/custom/include -I$(MSVCDir)/include -I$(MSVCDir)/PlatformSDK/include

So now where you have your HDK file, you need to create a file named Makefile with something like this:

DSONAME = SOP_Star.dll
SOURCES = SOP_Star.C
!INCLUDE $(HFS)/toolkit/makefiles/Makefile.nmake

Now to compile, you can just invoke nmake with no command line arguments:

nmake

You probably want to modifiy Makefile.win so that it copies the created .dll to $HOME/houdini8.0/dso as well though or else you will have to manually do this after compiling for Houdini to pick it up.

25187[/snapback]

Link to comment
Share on other sites

Thanks for your tips. All works fine but at least I get this error:

!IFNDEF OPTIMIZER

OPTIMIZER = -Ox

!ENDIF

!IFDEF MSVCDIR

MSVCDir = $(MSVCDIR)

!ENDIF

!INCLUDE c:/Program Files/Side Effects Software/Houdini 8.0.410/toolkit/makefiles/Makefile.win

OBJECTS = $(SOURCES:.C=.o)

CC = $(CC:/=\)

LINK = $(LINK:/=\)

!IFDEF DSONAME

.C.o:

echo Compiled on: > taginfo

date /T >> taginfo

time /T >> taginfo

echo by: %USERNAME%@%COMPUTERNAME% >> taginfo

!IFDEF SESI_TAGINFO

echo $(SESI_TAGINFO) >> taginfo

!ENDIF

c:/Program Files/Side Effects Software/Houdini 8.0.410/bin/sesitag -c -f taginfo > tagdefines

$(CC) $(OBJFLAGS) -DMAKING_DSO @tagdefines $< $(OBJOUTPUT)$@

del taginfo tagdefines

$(DSONAME): $(OBJECTS)

$(LINK) $(SHAREDFLAG) $(OBJECTS) $(DSOFLAGS) $(DSOOUTPUT)$@

!ENDIF

!IFDEF APPNAME

.C.o:

$(CC) $(OBJFLAGS) $< $(OBJOUTPUT)$@

$(APPNAME): $(OBJECTS)

$(LINK) $(OBJECTS) $(SAFLAGS) $(SAOUTPUT)$@

!ENDIF

************* HERE COMES THE ERROR ***********

all: $(DSONAME) $(APPNAME)

************* ERROR MESSAGE ******************

NMAKE (39) fatal error U1077: 'C:\Program' return code '0x1'

**********************************************

clean:

del /F /Q $(OBJECTS) $(APPNAME) $(DSONAME)

It seems that there is a problem with the variable $(APPNAME)

Any Idea ?

Thanks kroko...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...