Re: linking problem
Re: linking problem
- Subject: Re: linking problem
- From: mark <email@hidden>
- Date: Fri, 6 Jul 2007 15:02:21 +1200
- Ironport-content-filter: send-to-smtp
Title: Re: linking problem
On Jul 4, 2007, at 9:10 PM, mark
wrote:
I am saying that the plugin (project)
can't find the symbols and it won't link in the xcode
project.
I did use bundle_loader as well as
the stub library originally.
Taking out the stub caused the undefined symbols to
appear.
Are these functions and symbols being exported defined in C or C++
code, and are you using them from C or C++ code? What are the
actual error lines you're getting from the linker?
error for plugin compilation (without stub library):
Ld
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/Debug/DTBundlePlugin.bundle/Contents/MacOS/DTBundlePlugin
normal i386
cd
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin
/usr/bin/g++-4.0 -o
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/Debug/DTBundlePlugin.bundle/Contents/MacOS/DTBundlePlugin
-L/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/Debug
-L/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin
-L/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/../../build/Development
-L/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/../../build/Development
-F/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/Debug -filelist
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/DTBundlePlugin.build/Debug/DTBundlePlugin.build/Objects-normal/i386/DTBundlePlugin.LinkFileList -framework Carbon
-arch i386 -Wl,-Y,1455 -bundle -mmacosx-version-min=10.4
-bundle_loader
/Users/tridiak/Programming/Directory_Tree/DirTree/build/Development/DirTree.app/Contents/MacOS/DirTree -isysroot
/Developer/SDKs/MacOSX10.4u.sdk
error:
/usr/bin/ld: Undefined
symbols:
_DTCopyIconRefForFSRef
_DVCopyViewName
_DVGetFSRefPtr
_DVGetViewForWindow
_DV_CopySelectedObjects
_IsADir
_Pong
_SOCastToSOF
_SOGetFSRef
_activeView
_FSWCreateFSW
_FSWRelease
_GPTAdd
_GetFSWArrayCallbacks
_GetFSWSetCallbacks
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/DTBundlePlugin.build/Debug/DTBundlePlugin.build/Objects-normal/i386/main.o reference to undefined
_DTCopyIconRefForFSRef
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/DTBundlePlugin.build/Debug/DTBundlePlugin.build/Objects-normal/i386/main.o reference to undefined
_DVCopyViewName
<snip>
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/DTBundlePlugin.build/Debug/DTBundlePlugin.build/Objects-normal/i386/CopyMoveStuff.o reference to undefined
_GetFSWSetCallbacks
/Users/tridiak/Programming/Directory_Tree/DirTree/DTPlugins/DTBundlePlugin/build/DTBundlePlugin.build/Debug/DTBundlePlugin.build/Objects-normal/i386/CopyMoveStuff.o reference to undefined _IsADir
collect2: ld returned 1 exit status
The defined symbols are DEFINITELY being exported by the
application (development build) as 'nm' shows it.
I need to link against the stub to prevent these errors.
But linking against the stub causes it to link against the
"wrong" 'activeView' variable (stub's address are different
form application's).
I suspect, given what you've said so far, that the symbols are defined
in C++ code and are being used from C++ code. This means that
in your exported-symbols file (which typically has the extension
".exp" rather than ".txt"), you'll need to use the
C++-mangled name of the symbol, rather than the non-mangled
name.
The application is C++.
The functions and variable are definitely being exported as C as
the plugin is C only (for internal testing purposes).
All exported symbols have #ifdef __cplusplus .. extern
"C" { .... .
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden