Community
Participate
Working Groups
I'm trying to set up a managed build tool chain which generates a shared library on Mac OS. The problem I'm seeing is that the library output name is non-sensical, eg: libUSER_OBJS.dylib: $(OBJS) $(USER_OBJS) @echo 'Invoking: MacOS X C++ Linker' @echo g++ -dynamiclib -o libUSER_OBJS.dylib $(OBJS) $(USER_OBJS) $(LIBS) @g++ -dynamiclib -o libUSER_OBJS.dylib $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building: $@' @echo ' ' The problem seems to be with the Mac OS CPP linker tool (cdt.managedbuild.tool.macosx.cpp.linker) definition for the output type. <outputType outputs="" buildVariable="EXECUTABLES" nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider" id="cdt.managedbuild.tool.macosx.cpp.linker.output"> </outputType> I stepped into the GnuLinkOutputNameProvider code and it seems that the shared library is not detected. Specifically this line: if (hasAncestor(tool, "cdt.managedbuild.tool.gnu.cpp.linker")) { is failing since according to the tool definition the mac os linker is not actually subclassed off of the gnu linker. Without understanding what exactly the code is doing, my guess is this was probably just a simple oversight that slipped through the cracks. Should there be a MacOSLinkOutputNameProvider for the mac os linker?
Hi Chris, Unfortunately I don't have a Mac machine to test and reproduce your issue, so I initially want to test Mac-type MBS project types on my PC box and see if makefiles are generated correctly there. For now I could not reproduce the issue. Could you attach a sample project that exposes the incorrect lib name generation so that I could reproduce and fix it? Thanks, Mikhail
Shouldn't be hard to fix, but Mac hasn't been a priority for most of the committers, so this has languished for quite a while. Might be a good candidate for bugday.