Re: [opendx-dev] Compiling outboard module on MacOSX 10.4 Tiger

2005-07-06 Thread TAN MENG YUE


On 07/07/2005, at 12:58 AM, Joel Richardson wrote:



Here's what someone sent me a while back.
Hope this helps.


There is still linker error about missing symbols even with the new  
linker flags in the Makefile


I might double check my mdf2c script as I have made modification to  
it so that it can generate C++ code on Linux.


8---8---8---8---
merlion:~/projects/trunk/OpenDX/RIB nicholas$ make clean RIB
rm -f RIB *.o *.rib user.cpp *~
/usr/local/opendx/dx/bin/mdf2c -m RIB.mdf  user.cpp
g++ -no-cpp-precomp -dynamic -Wall -fno-common -fPIC -I/Applications/ 
Graphics/3Delight-4.0.4/include -I/usr/local/opendx/dx/include  -c  
user.cpp
g++ -no-cpp-precomp -dynamic -Wall -fno-common -fPIC -I/Applications/ 
Graphics/3Delight-4.0.4/include -I/usr/local/opendx/dx/include  -c  
RIB.cpp
g++ -no-cpp-precomp -dynamic -Wall -fno-common -fPIC -I/Applications/ 
Graphics/3Delight-4.0.4/include -I/usr/local/opendx/dx/include  -c  
RIBExporter.cpp
g++ -bundle -flat_namespace -bundle_loader /usr/local/opendx/dx/ 
bin_macos/dxexec -Wl,-iDXEntry:_DXEntry -e DXEntry user.o RIB.o  
RIBExporter.o -o RIB -L/Applications/Graphics/3Delight-4.0.4/lib -L/ 
usr/local/opendx/dx/lib_macos -l3Delight -lm

/usr/bin/ld: Undefined symbols:
_DXEntry
DXAddModule(char*, ...)
m_RIB(object**, object**)
collect2: ld returned 1 exit status
make: *** [RIB] Error 1

8---8---8---8---
# Set up the various base path
RMANTREE  = $(DELIGHT)
INCS = -I$(RMANTREE)/include -I$(DXROOT)/include
CFLAGS = -no-cpp-precomp -dynamic -Wall -fno-common -fPIC $(INCS)
CHECK   = -bundle_loader $(DXROOT)/bin_macos/dxexec
LDFLAGS = -bundle -flat_namespace $(CHECK) -Wl,-iDXEntry:_DXEntry -e  
DXEntry

LIBS= -L$(RMANTREE)/lib -L$(DXROOT)/lib_macos -l3Delight -lm

CC=gcc
CXX=g++
MDF2C=$(DXROOT)/bin/mdf2c

.c.o:
$(CC) $(CFLAGS) -c $

.cpp.o:
$(CXX) $(CFLAGS) -c $

.cxx.o:
$(CXX) $(CFLAGS) -c $

# RIB module
RIB:  user.o RIB.o RIBExporter.o
$(CXX) $(LDFLAGS) $? -o RIB $(LIBS)

user.cpp: RIB.mdf
$(MDF2C) -m $  $@

#
# clean up objects and executables
#

clean:
rm -f RIB *.o *.rib user.cpp *~
8---8---8---8---


[opendx-dev] Compiling outboard module on MacOSX 10.4 Tiger

2005-07-06 Thread Tan Meng YUE

Hi,

   I am porting a RenderMan outboard module from Linux to OSX.

   I have got OpenDX 4.3.2 running on OSX Tiger with no problem but the 
module compilation on OSX Tiger seems quite different from that in Linux.


   Does anyone have a sample Makefile which show one how to link the 
various libraries and build dynamical libraries on OSX Tiger.


   I have also encountered a DXAddModule() function not found error 
during the linkage.


Cheers



smime.p7s
Description: S/MIME Cryptographic Signature