|
From: | Pavel Ledin |
Subject: | Re[2]: [Openexr-devel] static link |
Date: | Fri, 15 Jun 2007 13:52:26 +0400 |
Hello Jeff,
Friday, June 15, 2007, 1:17:12 PM, you wrote:
Thank you for reply.
I know about -L and -l flags
construction
-L../../../openexr-1.4.0/IlmImf -llibIlmImf.a
does not works because -shared flag used and I'll get followed error during compiling
/usr/bin/ld: cannot find -llibIlmImf.a
collect2: ld returned 1 exit status
If I'll use constuction
-L../../../openexr-1.4.0/IlmImf -llibIlmImf
library will linked as shared
Problem that I need static link OpenEXR and as shared link libstdc++.
It's common problem and I don't know how to do it.
Or is it possible to link libstdc++ as static?
> -L is for paths to your libraries (similar to -I for include directories )
> -l is for linking to a particular library using the library paths
> so you should probably be doing something like
> -L../../../openexr- 1.4.0/IlmImf -llibIlmImf.a
> the -l is the what link the library i believe
> hope that helps,
> On 6/15/07, Pavel Ledin < address@hidden> wrote:
> Hello,
> How can I link OpenEXR library as static? I had tried it many times
> and many ways, but with no luck. And nobody know how to do it.
> I'm try to write mental ray output shader.
> My Makefile looks like this:
> CC = g++
> INC = -I/usr/autodesk/maya8.5/devkit/mentalray/include
> -I../../../openexr- 1.4.0/IlmImf -I../../../openexr-1.4.0/IlmThread
> -I../../../openexr-1.4.0/Imath -I../../../openexr-1.4.0/Iex
> -I../../../openexr-1.4.0/Half -I../../../zlib-1.2.3
> LIB = -L../lib -lstdc++
> ../../../openexr-1.4.0/IlmImf/.libs/libIlmImf.a ../../../openexr-
> 1.4.0/IlmThread/.libs/libIlmThread.a
> ../../../openexr-1.4.0/Imath/.libs/libImath.a
> ../../../openexr-1.4.0/Iex/.libs/libIex.a
> ../../../openexr-1.4.0/Half/.libs/libHalf.a -L../../../zlib-1.2.3 -lz
> CFLAGS = -O2 -fPIC -shared -export-dynamic
> shaders_p.so : p_OpenEXR_saver.cpp p_MegaTK_pass.cpp p_constant.cpp
> $(CC) $(INC) $(LIB) $(CFLAGS) -o shaders_p.so
> p_OpenEXR_saver.cpp p_MegaTK_pass.cpp p_constant.cpp
> local: shaders_p.so
> Shader comiled fine without any errors, but
> I always get Maya crash and this error during call my shader:
> /usr/autodesk/maya8.5/bin/maya.bin: symbol lookup error:
> /usr/autodesk/maya8.5/mentalray/lib/shaders_p.so: undefined symbol:
> _ZN3Imf5SliceC1ENS_9PixelTypeEPcjjiidbb
> What's wrong?
> Is it poosible to link static OpenEXR? Please help
> --
> Best regards,
> Pavel Ledin aka Puppet mailto:address@hidden
> Moscow, Russia
--
Best regards,
Pavel Ledin aka Puppet mailto:address@hidden
Moscow, Russia
[Prev in Thread] | Current Thread | [Next in Thread] |