Community
Participate
Working Groups
If an Executable project references another project using the Eclipse Common References page ((C/C++ Project Properties, Project References: http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_ref.htm) it does not get built when pressing the LaunchBar launch button. Using the original Build hammer toolbar button does build the projects under these conditions. If the project reference is made using the CDT project references page (C/C++ Project Properties, Paths and Symbols, Project References: http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_general_pns_ref.htm) then it does get built as expected. Having 2 project references pages is less than ideal, but it seems there are 2 pages because the CDT page provides extra functionality; supports build configurations. The original build hammer respects references made from either page. The LaunchBar launch button should too.
It depends on launch delegate, on how it handles buildForLaunch, you need to specify what launch configuration types it was, what mode it was etc. I created a C project with linux toolchain. I added references to another project. They both is built now when I press the button. I am using neon M6
Thanks for investigating. Attached is a test (Bug487884-mingw.zip) containing a C executable project, created on Windows for mingw and a static library project. The reference in cproject to staticlib is made project properties > Project References > Project references for 'cproject'. The cproject project also contains a "C/C++ Application" Debug Configuration. Steps to reproduce: 1) Import both projects 2) Clean both projects 3) In LaunchBar Launch Configuration select "cproject Debug" and launch mode as Debug. 4) Click LaunchBar launch button Observe: build commences but it fails to build the staticlib. 11:15:40 **** Rebuild of configuration Debug for project cproject **** Info: Internal Builder is used for build gcc "-IC:\\Users\\John\\workspace.drt.3.0release\\staticlib\\src" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\main.o" "..\\src\\main.c" gcc "-LC:\\Users\\John\\workspace.drt.3.0release\\staticlib\\Debug" -o cproject.exe "src\\main.o" -lstaticlib c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lstaticlib collect2.exe: error: ld returned 1 exit status Expected: build should build staticlib project first and then cproject and then launch. If I modify cproject properties > Paths and Symbols > References and select staticlib and OK and then LaunchBar launch button both projects are built and the launch succeeds. Tested on: Windows 8.1 Mars.1 CDT 8.8.0
Created attachment 259954 [details] test containing a C executable project, created on Windows for mingw and a static library project.