On Tue, May 31, 2011 at 12:46 PM, Christopher Sean Morrison
<[email protected]>wrote:
>
> On May 29, 2011, at 3:43 PM, Guilherme Kunigami wrote:
>
> Hi,
>
> I've successfully compiled and executed a simple ray-tracer using OSL.
> Though, this renderer was included together with OSL source code and they
> were compiled together too. Now, I'm trying to compile this renderer outside
> OSL build. Though, I've been stuck with compilation errors for three days.
>
>
> When in doubt, compile by hand. What's the actual compilation line for
> simplerend.cpp from OSL and testrender.cpp? The g++ lines, not the cmake
> foo leading to them...
>
Here is the g++ command I made by hand.
g++ testrender.cpp -I/Users/kunigami/dev/osl/dist/macosx/include/OSL/
-I/opt/local/include -I/Users/kunigami/dev/oiio/dist/macosx/include/
-lOpenImageIO -L/Users/kunigami/dev/oiio/dist/macosx/lib
-L/Users/kunigami/dev/osl/dist/macosx/lib/ -loslexec -loslcomp -loslquery
>
> The file I'm trying to compile is 'testrender.cpp':
> http://pastebin.com/HmstAteR
>
>
> Please use a different pastebin service such as paste.ubuntu.com or
> pastebin.ca or paste2.org. The pastebin.com site is inaccessible (network
> blocked) for some of the devs due to a history of problems.
>
> That said, I don't see anything glaring in your file. The only question is
> whether the abstract base class was compiled into the OSL_NAMESPACE or not,
> which depends on some compilation trigger.
>
> Note that 'RendererServices' contains several "pure virtual methods", but
> I'm implementing them all in the derived class SimpleRenderer at
> testrender.cpp. Also, when I compile testender.cpp together with the OSL
> library, this compile error does not happen. In this case, the
> CMakeLists.txt is a bit different, because we have references to oslexec,
> oslcomp and oslquery:
>
>
> That's pretty telling. Show the entire compilation output from the g++
> line to the final error message for both files and it should be more clear
> what's going on.
>
It's actually the complete error message. I've compiled in verbose mode for
more information, but I don't think they're useful at all:
http://paste.ubuntu.com/615807/
Here's the output of the cmake execution for the working case:
http://paste.ubuntu.com/616027/
It seems that OSL_NAMESPACE is not being set by the compiler.
I made the following test on testrender.cpp:
cout << OSL_NAMESPACE << endl;
But the compiler said that OSL_NAMESPACE was not defined.
I've also listed the dynamic libraries linked to executable ./testerender
(from the working version)
http://paste.ubuntu.com/616030/
>
> Cheers!
> Sean
>
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with
> vRanger.
> Installation's a snap, and flexible recovery options mean your data is
> safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> BRL-CAD Developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel