Jump to content

Makefile .dll MinGW problem


Recommended Posts

Hi!

I'm new to this HDK thing, and I'm trying to compile a school laboration at home. At school we run Ubuntu and everything works fine, but I want to work at home for the upcoming project, and I'm running Windows 7 at home, so I need to make things work.

I'm running Houdini 10, with Visual Studio 2005 (8), as I've heard should be the one to use.

So I want to use Makefiles instead of "hcustom" to be able to use libraries from other files and so on. But I can't get the Makefile I use at school to work at home, please help me with this problem :]

This is the makefile I use in school (Makefile.VEXOP):

#Set OPTIMIZER to override the optimization level (defaults to -O2)
#Set INCDIRS to specify any additional include directories.
#Set LIBDIRS to specify any addition library include directories
#Set SOURCES to list all .C files required to build the DSO or App
#Set DSONAME to the name of the desired output DSO file (if applicable)
#Set APPNAME to the name of the desires output application (if applicable)

SOURCES = lib/RigidMultifractal.cpp vexop/VEX_Op_RigidMultifractal.cpp

    DSONAME = VexRigidMultifractal.so
    LIBDIRS = -L $(DRWLIBS)/lib -lpthread -lm

    INCDIRS = -I.

ifeq ($(OS), Windows_NT)
ifndef OPTIMIZER
    OPTIMIZER = -Ox
endif
include $(HFS)/toolkit/makefiles/Makefile.win
else
include $(HFS)/toolkit/makefiles/Makefile.linux
endif

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

ifdef DSONAME
TAGINFO = $(shell (echo -n "Compiled on:" `date`"\n         by:" `whoami`@`hostname`"\n$(SESI_TAGINFO)") | sesitag -m)

%.o:		%.cpp
	$(CC) $(OBJFLAGS) -DMAKING_DSO $(TAGINFO) $< $(OBJOUTPUT)$@

$(DSONAME):	$(OBJECTS)
	$(LINK) $(SHAREDFLAG) $(OBJECTS) $(DSOFLAGS) $(DSOOUTPUT)$@
else
%.o:		%.cpp
	$(CC) $(OBJFLAGS) $< $(OBJOUTPUT)$@

$(APPNAME):	$(OBJECTS)
	$(LINK) $(OBJECTS) $(SAFLAGS) $(SAOUTPUT)$@
endif

default:	$(DSONAME) $(APPNAME)

clean:
	rm -f $(OBJECTS) $(APPNAME) $(DSONAME)

install:
	cp $(DSONAME) ~/houdini10.0/dso/$(DSONAME)

At home I have MinGW installed, and when running

C:\MinGW\bin\mingw32-make.exe -f Makefile.VEXOP

in the houdinig command line prompt, with MSVCDir linked and so on (I can compile example files like SOP_Star.C), the follow error occurs:

LINK : warning LNK4044: unrecognized option '/L'; ignored
LINK : warning LNK4044: unrecognized option '/lib'; ignored
LINK : warning LNK4044: unrecognized option '/lpthread'; ignored
LINK : warning LNK4044: unrecognized option '/lm'; ignored
lib/RigidMultifractal.o : fatal error LNK1107: invalid or corrupt file: cannot read at 0x1110
mingw32-make: *** [VexRigidMultifractal.so] Error 1107

Is it possible to be able to work from home, or am I doomed? =)

I really want to get this to work really soon, thanks in advance!

I will upload the code that works in school, that compiles a .so-file.

(I have tried to change in the makefile to .dll and tried some various things, but with no success at all).

stuff.rar

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...