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

2005-07-06 Thread Joel Richardson


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

Cheers,
Joel

Tan Meng YUE wrote:

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



--

===
Joel Richardson, Ph.D.   Phone: (207) 288-6435
The Jackson Laboratory   Fax:   (207) 288-6132
600 Main Street  URL:   www.informatics.jax.org
Bar Harbor, Maine 04609
===


dxRunTimeMacOS.rtf
Description: RTF file


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

2005-07-06 Thread John Pormann


On Jul 6, 2005, at 9:55 AM, Tan Meng YUE wrote:

   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.


How did you get it to compile?  I tried using the OpenMotif libs with  
OpenDX-4.3.2 on OSX/Tiger, but it croaked with compiler errors --  
multiply defined functions in the Xm/Xmu libs.  I couldn't get  
LessTif to compile either, so I had just about given up.


Do you have the configure options that you used?  Or makefiles/etc?


John



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

2005-07-06 Thread John R. Cary

Old, but perhaps still has some help:

http://fusion.txcorp.com/install/DxInstall.html

JRC



On Wed, 6 Jul 2005, John Pormann wrote:



On Jul 6, 2005, at 9:55 AM, Tan Meng YUE wrote:

   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.


How did you get it to compile?  I tried using the OpenMotif libs with 
OpenDX-4.3.2 on OSX/Tiger, but it croaked with compiler errors -- multiply 
defined functions in the Xm/Xmu libs.  I couldn't get LessTif to compile 
either, so I had just about given up.


Do you have the configure options that you used?  Or makefiles/etc?


John





--
  John R. Cary
Professor, Dept. of Physics, University of Colorado, Boulder, CO 80309-0390
   [EMAIL PROTECTED]
ph. (303) 492-1489fax (303) 492-0642cell (720) 839-5997


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