[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem in .so file linking and creation using g++ Options

From: Akshay Loke
Subject: Problem in .so file linking and creation using g++ Options
Date: Mon, 14 Jul 2008 17:10:05 -0700 (PDT)
User-agent: G2/1.0

Hi all,
I am a recent convert to the world of Linux, and am trying to port a
maya plugin app from Windows to Linux. So here's the deal:

I have a windows mll ( a maya dll, which is practically, just a
dll)... the main project dll in windows depends on a number of other
projects and the linking to these libraries is done statically in
windows... that means that the .lib files are specified using -L and
the -l options...

Now in linux, the compilation of the main project is working well...
but then i tried to link the .o files generated... and just for
i did not give the paths of any shared libraries which the final .so
would be using for linking... all i gave was the path of the builtin
maya libraries.. Now, quite surprisingly the .so file was created,
whereas i thought that the linker would throw up a host of linking
errors since I had not given any linker libraries...

here's my linking commandline statement...

DLINUX_64 -fPIC -fno-strict-aliasing -DREQUIRE_IOSTREAM -Wno-
deprecated -O3 -Wno-multichar -Wno-comment -Wno-sign-compare -
funsigned-char -Wno-reorder -fno-gnu-keywords -ftemplate-depth-25 -
pthread  -Wno-deprecated -fno-gnu-keywords -Wl,-Bsymbolic -shared -o pluginMain.o octaneLinkCmd.o OctaneLink.o
OctaneLinkPCH.o OLCommand.o OLCreate.o OLMaya.o OLMessageHandler.o
OLNode.o OLUpdate.o -L/disk1/stage/apps/alias/maya/lib -lOpenMaya -
lFoundation -lOpenMayaAnim -lOpenMayaUI

All the .o object files listed are created before the linker starts
doing its job...

so how is it that the .so file was created without the linker
up errors? Am i missing any g++ commandline option here??

I kind of know for a fact that the .so file which has been created is
wrong, since it is not being loaded into maya as a plugin... it is
throwing up an error while loading saying:

//Error: Unable to dynamically load: /depot/Octane/branches/DAS/Code/
//Undefined symbol: _ZN80LLUtils12DefaultPrintEPKc

Can someone please give me some advice on this? I am just begining to
learn the intricacies of the g++ compiler, and I feel I may have
missed something while giving the commandline options...

Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]