Bug 1394 - auto generated codes by Yocto Eclipse plugin compiling failed
Summary: auto generated codes by Yocto Eclipse plugin compiling failed
Status: RESOLVED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1
Assignee: Lianhao Lu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-08-22 22:22 UTC by Tong Lin
Modified: 2011-08-31 03:26 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
screenshot (185.39 KB, image/x-png)
2011-08-22 22:22 UTC, Tong Lin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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