Using a dictionary without gSystem->Load, Mac OS version

I’m one step closer.

I found that adding the following line enabled compilation and linking on Mac OS X, but has no effect on the Linux process:

link_libraries (${ROOT_LIBRARIES})

In context, the key lines now read:

set(LibName ${CMAKE_PROJECT_NAME}DataObj)
ROOT_GENERATE_DICTIONARY ( ${Dictionary} ${headerList} LINKDEF ${LinkDef} )
link_libraries (${ROOT_LIBRARIES})
add_library (${LibName} SHARED ${Dictionary}.cxx ${DataObjSrc})

The .pcm file is generated.

However, I’m back to where I was in the earlier problem. When I try to execute the program, it behaves as if it can’t find the dictionary library:

Error in <TTree::Branch>: The pointer specified for EventID is not of a class known to ROOT
Error in <TTree::Branch>: The class requested (map<int,grams::MCTrack>) for the branch "TrackList" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (map<int,grams::MCTrack>) to avoid to write corrupted data.

I’m in search of the “magical” cmake invocation that does what -Wl,--no-as-needed did in Linux.