Bug 487884 - [LaunchBar] Does not build project if contains references made using "Eclipse Common References page"
Summary: [LaunchBar] Does not build project if contains references made using "Eclipse...
Status: REOPENED
Alias: None
Product: CDT
Classification: Tools
Component: launchbar (show other bugs)
Version: 8.8.0   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-16 10:13 EST by John Moule CLA
Modified: 2020-09-04 15:19 EDT (History)
2 users (show)

See Also:


Attachments
test containing a C executable project, created on Windows for mingw and a static library project. (8.54 KB, application/octet-stream)
2016-02-26 06:34 EST, John Moule CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Moule CLA 2016-02-16 10:13:06 EST
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.
Comment 1 Elena Laskavaia CLA 2016-02-24 13:16:28 EST
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
Comment 2 John Moule CLA 2016-02-26 06:32:54 EST
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
Comment 3 John Moule CLA 2016-02-26 06:34:24 EST
Created attachment 259954 [details]
test containing a C executable project, created on Windows for mingw and a static library project.