gtcarriere / iphone-gcc

Automatically exported from code.google.com/p/iphone-gcc
0 stars 0 forks source link

<stdio.h> no such file or directory #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Write a simple HelloWorld.c program. 
2. Compile via iphone gcc

What is the expected output? What do you see instead?
1. A working Hello World program.
2. An error: Error: <stdio.h> no such file or directory

What version of the product are you using? On what operating system?

4.2

Please provide any additional information below.

Installed via cydia

Original issue reported on code.google.com by Michaelw...@googlemail.com on 11 Apr 2008 at 12:56

GoogleCodeExporter commented 8 years ago
have you downloaded the Xcode 3.0 DMG from Apple's Developer Tools download 
page and 
then placed these header files in /usr/local/include ?

Original comment by david.m....@gmail.com on 11 Apr 2008 at 8:47

GoogleCodeExporter commented 8 years ago
I have 2.5 installed as 3.0 is Leopard only.

I've tried to copy the header files over but I'm now getting new errors?

Thanks

Original comment by Michaelw...@googlemail.com on 11 Apr 2008 at 11:22

GoogleCodeExporter commented 8 years ago
-> posting the errors usually help :)

Original comment by david.m....@gmail.com on 12 Apr 2008 at 7:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ahhh yes that would help!

So I literally copied my include folder 
(/Developer/SDKs/MacOSX10.4u.sdk/usr/include)  to my iphone 
(/usr/local/include), typed gcc HelloWorld.c -o HelloWorld and get the 
following errors!

Attached

Cheers

Had to upload the file somewhere else as google is not letting me upload it 
here.

http://www.filejumbo.com/Download/2ED16072DDCD08C2/

Original comment by Michaelw...@googlemail.com on 12 Apr 2008 at 12:29

GoogleCodeExporter commented 8 years ago
I got it working

I followed your instructions for the header files.

Could you not include the include files as part of the installation?

Thanks

Original comment by Michaelw...@googlemail.com on 13 Apr 2008 at 6:24

GoogleCodeExporter commented 8 years ago
you know why we can't, it involves looking above stdio.h....

(answer: they are copyrighted to apple and reditributing them by any means 
electronically or otherwise is ileagal)

if you want to write them from scratch and better and make them open source 
then we 
could, but otherwise download them off apple--

just a bit of market research:

Q1. Would you enjoy a gcc GUI for the iphone

Q2. would you help builf the GUI for iCode...

Thanks

Original comment by david.m....@gmail.com on 14 Apr 2008 at 2:30

GoogleCodeExporter commented 8 years ago
I see your point!

How about putting a note on the install package to inform people they must 
create the headers themselves? 
Its not very clear as most Cydia packages are self contained.

Just a thought.

1.  Yes definitely.

2.  Yes definitely

Original comment by Michaelw...@googlemail.com on 14 Apr 2008 at 9:24

GoogleCodeExporter commented 8 years ago
Well, if you do then start developing and I will add you to the developing team:

We expect that it will have a "Settings" - like first menu with options like 
new 
project, work on existing etcetc. then when you start a new one those alerts 
where 
you can type stuff and then it will take you to the main text editor

I have already done the editor/compiler (yes i have compiled hello world from a 
GUI) 
but we mainly need help with the first-off menu

(also with the compiler - we have a fundamental flaw -> no error messages, 
quite 
funny really, if you compile yes no errors, but you know when you fail -> the 
whole 
app crashes)

wait, just email me on david.m.thornton@gmail.com 

That is... If you rinterested

Original comment by david.m....@gmail.com on 26 Apr 2008 at 10:40

GoogleCodeExporter commented 8 years ago
I feel like I've missed something in the exchange here - how did Michael 
resolve the
error he was getting about invalid architecture?

Original comment by sec...@ichi2.net on 16 Jun 2008 at 11:11

GoogleCodeExporter commented 8 years ago
Hi - yes this is a typical frustrating support thread - ie someone has a 
problem,
they resolve it (but don't really say how) and everyone is happy, except the 
next
reader!  Please post how you got past this, or better still, a step-by-step
description of the whole flow

Original comment by hazzrich...@yahoo.co.uk on 23 Jul 2008 at 12:52

GoogleCodeExporter commented 8 years ago
Guys,

Sorry for not posting my resolution - The problem was I was using 10.4 rather 
than 10.5 which did not 
include the header files.  So I just literally followed what is on the wiki 

.....

Okay, so you don't have headers-4.0.0-iphone-1.tgz; you have to build this 
package yourself. The following 
steps must be done on your MAC OS X computer if you arent on OSX see the next 
step below to obtain 
headers:

$ svn co http://iphone-dev.googlecode.com/svn/branches/include-1.2-sdk
$ wget http://iphone-gcc.googlecode.com/files/headers.patch.gz
$ THISPATH=`pwd`
$ INSTPATH=$THISPATH/usr/local
$ MACOSXDK=/Developer/SDKs/MacOSX10.4u.sdk
$ pushd include-1.2-sdk
$ ./configure --with-macosx-sdk=$MACOSXDK --prefix=$INSTPATH
$ bash install-headers.sh
$ cd $INSTPATH/include && zcat $THISPATH/headers.patch.gz | patch -p1
$ cd $INSTPATH/include/c++ && ln -s 4.0.0 4.0.1
$ popd
$ tar -czf headers-4.0.0-iphone-1.tgz usr

This all needs to be done on your mac with the toolchain. Then just follow the 
rest of the instructions.

If you haven't already maybe you should take a look at the official SDK.

Original comment by Michaelw...@googlemail.com on 28 Jul 2008 at 12:51

GoogleCodeExporter commented 8 years ago
The headers.patch.gz file is no longer on the server, any other place to get it?

Original comment by donacian...@gmail.com on 29 Aug 2008 at 3:47

GoogleCodeExporter commented 8 years ago
Bump, I'm not sure how important headers.patch.gz is. Where can it be found?

Original comment by agimblei...@gmail.com on 7 Sep 2008 at 2:42

GoogleCodeExporter commented 8 years ago
I know that including the headers would  be illegal, but would it be possible 
to have a command line argument 
(such as gcc -headers) that would download the sdk (from apple servers, 
legally) and then extract the headers, 
put them in the right place then delete the unneeded parts of the sdk as it is 
over 2GB.

Original comment by mentalik...@gmail.com on 3 Jul 2009 at 2:46

GoogleCodeExporter commented 8 years ago
I oppose the view that including the headers would be illegal. From what I see 
in 
the actual headers, there are headers licensed under the APSL, various BSD-like 
licences and the GPL. The only headers I could find that do not specify any 
licence 
but just state ‘Copyright (c) ... Apple Inc. All rights reserved.’ are 
located in 
include/arm, include/mach/arm and include/libkern/arm, plus there are some gch 
files. I propose that these files be omitted until their licensing becomes 
clear and 
all the rest be added to the GCC package in Cydia.

Although this is anyway not the right place to ask for changes in the Cydia 
package, 
is it?

Original comment by chortos@inbox.lv on 8 Sep 2009 at 7:08

GoogleCodeExporter commented 8 years ago
I have found several more files that lack licence information, but still they 
can 
just be omitted.

Original comment by chortos@inbox.lv on 8 Sep 2009 at 7:24