Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: correct ancient compile flags

...

Code Block
g++ -fPIC -I$RMANTREE/include -c myfunc.cpp -o myfunc.o
g++ -shared myfunc.o -o myfunc.so

Mac OS-X

Code Block
gclang++ -std=c++11 -I$RMANTREE/include -c myfunc.cpp -o myfunc.o
setenv MACOSX_DEPLOYMENT_TARGET 10.5
gclang++ -bundle -undefined dynamic_lookup myfunc.o -o myfunc.so

...

Windows

Code Block
cl -nologo -MD -MTEHsc -I"%RMANTREE%\include" -c myfunc.cpp
link -nologo -DLL -out:myfunc.dll myfunc.obj "%RMANTREE%\lib\libprman.lib"

...

Code Block
g++ -c -fPIC -I$RMANTREE/include myapp.cpp -o myapp.o
g++ myapp.o -L$RMANTREE/lib -lprman -o myapp

Mac OS-X

Code Block
gclang++ -std=c++11 -I$RMANTREE/include -c myfunc.cpp -o myapp.o
setenv MACOSX_DEPLOYMENT_TARGET 10.5
gclang++ -bundle -undefined dynamic_lookup myfunc.o -o myfunc.so

Windows

Code Block
cl -nologo -MD -MTEHsc -I"%RMANTREE%\include" -c myfunc.cpp
link -nologo -DLL -out:myfunc.dll myfunc.obj "%RMANTREE%\lib\libprman.lib"

Dynamic Loading RenderMan

In this case, the libprman library is loaded by the application at runtime from the RMANTREE environment variable. This is made possible by directly linking the libloadprman.a static library the static library into your application. When using the RenderMan API, a RixContext pointer may be obtained by calling RixGetContextViaRMANTREE.

...

Code Block
g++ -c -fPIC -I$RMANTREE/include myapp.cpp -o myapp.o
g++ myapp.o $RMANTREE/lib/libloadprman.a -o myapp

Mac OS-X

Code Block
languagebash
clang++ -std=c++11 -c -I$RMANTREE/include myapp.cpp -o myapp.o
clang++ myapp.o $RMANTREE/lib/libloadprman.a -o myapp

Windows

Code Block
languagebash
cl -nologo -MD -EHsc -I"%RMANTREE%\include" -c myapp.cpp
link -nologo -out:myapp.exe myapp.obj "%RMANTREE%\lib\libprman.lib"