Bug 1394

Summary: auto generated codes by Yocto Eclipse plugin compiling failed
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Tong Lin <tong.lin>
Component: eclipse-pluginAssignee: Lianhao Lu <lianhao.lu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: lianhao.lu, poky.adt.watcher, poky.watcher, yp.ep.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
screenshot none

Description Tong Lin 2011-08-22 22:22:46 UTC
Created attachment 210 [details]
screenshot

Create a yocto project in ADT as the  document: Application Development Toolkit (ADT) User's Guide describes, the auto generated codes compiling failed. The operation steps ars as following:

1.Select File -> New -> Project.

2.Double click “CC++”.

3.Double click “C Project” to create the project.

4.Double click “Yocto ADT Project”.

5.Select “Hello World ANSI C Autotools Project”. This is an Autotools-based project based on a Yocto Project template.

6.Put a name in the “Project name:” field.

7.Click “Next”.

8.Add information in the “Author” field.

9.Use “GNU General Public License v2.0” for the License.

10.Click “Finish”.

11.Answer ‘Yes” to the open perspective prompt.

12.In the Project Explorer expand your project.

13. Project->Build project

   the screenshot is in the attachment. The Compiler cannot resolve the variable EXIT_SUCCESS, I think the auto generated codes lack "#include <stdio.h>" statements.
Comment 1 Jessica 2011-08-23 09:41:52 UTC
Hi Tong,

I've tried the exact step but couldn't reproduce the problem.  So which tool chain you are using? I'm using the the toolchain that installed with adt_installer and it's built by autobuilder.  BTW, my system is 32bit so the toolchain that I'm using is i686-i586.
Comment 2 Jessica 2011-08-23 11:36:48 UTC
NM the previous comments, fixed by this commit: http://git.yoctoproject.org/cgit.cgi/eclipse-poky/commit/?id=008617ec3a850edb9a89d938cdc8a8b32fb7b414
Comment 3 Lianhao Lu 2011-08-31 03:15:13 UTC
It seems the compiling is not failed, but the CDT still reports "Symbol EXIT_SUCCESS" could not be resolved in the source editor, even with the line "#include <stdio.h>".
Comment 4 Lianhao Lu 2011-08-31 03:26:37 UTC
This seems a bug in CDT. 

By returning 0 instead of EXIT_SUCCESS in the project source template we can avoid this CDT bug.

http://git.yoctoproject.org/cgit.cgi/eclipse-poky/commit/?id=610d80fa6dc72108ee1685acbfca634e064082a6