GithubHelp home page GithubHelp logo

gtcarriere / iphone-gcc Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 26.71 MB

Automatically exported from code.google.com/p/iphone-gcc

HTML 3.78% C 78.11% Groff 2.82% Perl 1.72% Yacc 0.20% C++ 7.83% Assembly 0.38% Objective-C 0.34% Shell 0.79% Makefile 1.59% Batchfile 0.30% TeX 2.10% DIGITAL Command Language 0.05%

iphone-gcc's People

iphone-gcc's Issues

<iostream.h> error

Hello,
i can't compile c++ code. i'm on iOS 4.1. c code works fine, but if i try to 
compile c++ code, the compiler says "..iostream.h error: std::...has not been 
declared."
Is there any possibility to compile c++ code?

Original issue reported on code.google.com by [email protected] on 5 Dec 2010 at 4:57

iostream: No such file or directory

Hey
I'm trying to compile a hello world app using g++ on my Ipod Touch 2.2.1. 
With Ubuntu 9.04, using SSH in terminal for communication. Simple the
source looks like this:
-----------file: helloi.cpp-----------
#include <iostream>
using namespace std;
int main(){
cout<<"Hello World";
return 0;
}
--------------------------------------
Running the following command in terminal: g++ helloi.cpp -o helloi
Gives the following output:
-----------------------------------------------------------
Basels-iPod:/ root# g++ helloi.cpp -o helloi     
helloi.cpp:1:20: error: iostream: No such file or directory
helloi.cpp: In function 'int main()':
helloi.cpp:4: error: 'cout' was not declared in this scope
Basels-iPod:/ root# 
-----------------------------------------------------------

I've installed all the headers and libraries. And iostream does exist in
"/usr/local/include/c++/4.0.0" But for some reason it can't find it.

g++ can find other headers and libraries like stdio.h

I ran also the "-v" parameter and it gives the following output:

-----------------------------------------------------------------
Basels-iPod:/ root# g++ -v helloi.cpp -o helloi
Using built-in specs.
Target: arm-apple-darwin9
Configured with: ../llvm-gcc-4.2/configure --build=x86_64-unknown-linux-gnu
--host=arm-apple-darwin9 --enable-static=no --enable-shared=yes
--prefix=/usr --localstatedir=/var/cache/iphone-gcc
--enable-languages=c,c++,objc,obj-c++ --enable-wchar_t=no
--with-gxx-include-dir=/usr/include/c++/4.0.0
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5555)
 /usr/libexec/gcc/arm-apple-darwin9/4.2.1/cc1plus -quiet -v -D__DYNAMIC__
helloi.cpp -fPIC -fno-builtin-strcat -fno-builtin-strcpy -quiet -dumpbase
helloi.cpp -maspen-version-min=2.0 -auxbase helloi -version
-D__private_extern__=extern -o /var/tmp//ccofuixn.s
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/arm-apple-darwin9"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
ignoring nonexistent directory
"/usr/lib/gcc/arm-apple-darwin9/4.2.1/../../../../arm-apple-darwin9/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/arm-apple-darwin9/4.2.1/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
GNU C++ version 4.2.1 (Based on Apple Inc. build 5555) (arm-apple-darwin9)
    compiled by GNU C version 4.2.1 (Based on Apple Inc. build 5555).
GGC heuristics: --param ggc-min-expand=37 --param ggc-min-heapsize=14848
Compiler executable checksum: 41d0283dac71d3ba0737aebaabc8c9c0
helloi.cpp:1:20: error: iostream: No such file or directory
helloi.cpp: In function 'int main()':
helloi.cpp:4: error: 'cout' was not declared in this scope
Basels-iPod:/ root# 
--------------------------------------------------------------

The compiler did obviously not find the following directories which include
iostream.

---------------------
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/arm-apple-darwin9"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
ignoring nonexistent directory
"/usr/lib/gcc/arm-apple-darwin9/4.2.1/../../../../arm-apple-darwin9/include"
----------------------

The directorys are in fact in "/var/include". So I linked to these
directories. The linking was somehow successful. But the result from the
compiler isn't pretty :P. It just gave me more errors. Take a look at the
output:

-------------------------------------------
Basels-iPod:/ root# g++ helloi.cpp -o helloi               
In file included from helloi.cpp:1:
/usr/include/c++/4.0.0/iostream:43:28: error: bits/c++config.h: No such
file or directory
In file included from /usr/include/c++/4.0.0/ios:43,
                 from /usr/include/c++/4.0.0/ostream:44,
                 from /usr/include/c++/4.0.0/iostream:44,
                 from helloi.cpp:1:
/usr/include/c++/4.0.0/iosfwd:45:29: error: bits/c++locale.h: No such file
or directory
/usr/include/c++/4.0.0/iosfwd:46:25: error: bits/c++io.h: No such file or
directory
In file included from /usr/include/c++/4.0.0/bits/ios_base.h:45,
                 from /usr/include/c++/4.0.0/ios:48,
                 from /usr/include/c++/4.0.0/ostream:44,
                 from /usr/include/c++/4.0.0/iostream:44,
                 from helloi.cpp:1:
/usr/include/c++/4.0.0/bits/atomicity.h:38:30: error: bits/atomic_word.h:
No such file or directory
In file included from /usr/include/c++/4.0.0/memory:54,
                 from /usr/include/c++/4.0.0/string:47,
                 from /usr/include/c++/4.0.0/bits/locale_classes.h:47,
                 from /usr/include/c++/4.0.0/bits/ios_base.h:47,
                 from /usr/include/c++/4.0.0/ios:48,
                 from /usr/include/c++/4.0.0/ostream:44,
                 from /usr/include/c++/4.0.0/iostream:44,
                 from helloi.cpp:1:
/usr/include/c++/4.0.0/bits/allocator.h:52:31: error: bits/c++allocator.h:
No such file or directory
In file included from /usr/include/c++/4.0.0/bits/ios_base.h:47,
                 from /usr/include/c++/4.0.0/ios:48,
                 from /usr/include/c++/4.0.0/ostream:44,
                 from /usr/include/c++/4.0.0/iostream:44,
                 from helloi.cpp:1:
/usr/include/c++/4.0.0/bits/locale_classes.h:49:23: error: bits/gthr.h: No
such file or directory
In file included from /usr/include/c++/4.0.0/bits/basic_ios.h:44,
                 from /usr/include/c++/4.0.0/ios:50,
                 from /usr/include/c++/4.0.0/ostream:44,
                 from /usr/include/c++/4.0.0/iostream:44,
                 from helloi.cpp:1:
/usr/include/c++/4.0.0/bits/locale_facets.h:132:31: error:
bits/ctype_base.h: No such file or directory
/usr/include/c++/4.0.0/bits/locale_facets.h:1508:33: error:
bits/ctype_inline.h: No such file or directory
/usr/include/c++/4.0.0/bits/locale_facets.h:2967:33: error:
bits/time_members.h: No such file or directory
/usr/include/c++/4.0.0/bits/locale_facets.h:4491:37: error:
bits/messages_members.h: No such file or directory
-----------------------------------------------------

The output is actually more than that, but I can't post the whole thing.

I've also tried all of this with gcc instead of g++ with the same result. 

I've tried fixing this for 6 hours now, and am going nuts!!!

I appreciate all the help I can get!!

Cheers   //Basel

Original issue reported on code.google.com by [email protected] on 22 Jun 2009 at 1:40

OpenSSL doesn't work from /usr/include yet somewhere else?

Brief description of problem - the more info you provide the less ttl the 
problem has...


MOST IMPORTANT QUESTION: CAN YOU printf("Hello, World); ?


What steps will reproduce the problem?
1. Install iphone-gcc on iPhone 3G with 3.1.3.
2. Attempt to compile rtmpdump
3.

What is the expected output? What do you see instead?

While attempting to compile rtmpdump and telling it INC="-I/...." the location 
of OpenSSL or simply not even putting INC= which worked before, it claims my 
OpenSSL is too old, yet if I do "cp -r /usr/include/openssl /var/mobile" then 
do INC="-I/var/mobile/" oddly the exact same headers now work.


What firmware version of itouch/phone?



What Computer operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 30 Mar 2013 at 3:44

error unrecognized GNU C compiler

Steps to prepare environment (running on firmware 2.0 5A347, jailbroken,
with Cydia):

1. on iPhone: apt-get install iphone-gcc make ldid
2. on Mac (Leopard, Xcode 3.0, iPhone SDK final version): rsync over
/Developer/SDKs/MacOSX10.4u.sdk/ from mac to iPhone
3. on iPhone: svn co
http://iphone-dev.googlecode.com/svn/branches/include-1.2-sdk
4. cd include-1.2-sdk ; ./configure ; chmod +x install-headers.sh ;
./install-headers.sh

Try to compile something on the iPhone, e.g.
arm-apple-darwin9-gcc -c -I/usr/local/arm-apple-darwin/include  MyExample.m
-o MyExample.o

This should compile the code and produce something ready to be linked

Instead we get this error (and LOTS more after):
In file included from
/usr/local/arm-apple-darwin/include/CarbonCore/ConditionalMacros.h:42,
                 from
/usr/local/arm-apple-darwin/include/CarbonCore/MacTypes.h:20,
                 from
/usr/local/arm-apple-darwin/include/CoreFoundation/CFBase.h:38,
                 from
/usr/local/arm-apple-darwin/include/CoreFoundation/CoreFoundation.h:38,
                 from MyExample.h:1,
                 from MyExample.m:1:
/usr/local/arm-apple-darwin/include/TargetConditionals.h:123:10: error:
#error unrecognized GNU C compiler
In file included from
/usr/local/arm-apple-darwin/include/CarbonCore/DriverServices.h:32,
                 from
/usr/local/arm-apple-darwin/include/CarbonCore/CarbonCore.h:125,
                 from
/usr/local/arm-apple-darwin/include/CoreServices/CoreServices.h:24,
                 from
/usr/local/arm-apple-darwin/include/CoreGraphics/CGEvent.h:17,
                 from
/usr/local/arm-apple-darwin/include/CoreGraphics/CoreGraphics.h:24,
                 from /usr/local/arm-apple-darwin/include/UIKit/UIKit.h:3,
                 from MyExample.h:2,
                 from MyExample.m:1:
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:286:
error: expected ')' before '*' token
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:287:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'ExceptionHandlerUPP'
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:297:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'NewExceptionHandlerUPP'
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:308:
error: expected ')' before 'userUPP'
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:320:
error: expected ')' before '*' token
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:331:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'ExceptionHandlerTPP'
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:332:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'ExceptionHandler'
/usr/local/arm-apple-darwin/include/CarbonCore/MachineExceptions.h:342:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'InstallExceptionHandler'
In file included from
/usr/local/arm-apple-darwin/include/CarbonCore/CarbonCore.h:161,
                 from
/usr/local/arm-apple-darwin/include/CoreServices/CoreServices.h:24,
[snip - lots more follows]


Original issue reported on code.google.com by [email protected] on 23 Jul 2008 at 1:12

<stdio.h> no such file or directory

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 [email protected] on 11 Apr 2008 at 12:56

iostream not working out of the box

Hello,
I have ipod 1g 3.0 sw. I was able to compile hello world and some cocoa touch 
apps with user 
interface and advance features. I have copied header files to 
usr/local/include, also frameworks. C, 
objective c works great, but not c++. I assume the problem might be the 
compiler flags. Any ideas?
??

For the IDE I am using Backgrounder for a fast switch between termainal.app and 
iFile. Would be 
nice to have it all in one app. Also, Erica Sadun's "launch" command line 
utility is not working on 
3.0.

Original issue reported on code.google.com by [email protected] on 12 Aug 2009 at 10:30

after build, executing an app returns 'Killed' then exits.

Brief description of problem - the more info you provide the less ttl the
problem has...
When I build an app with iphone-gcc running the application writes 'Killed'
to stderr.
It also does this with the new toolchain that I built on my macosx leopard
machine... something wrong with my iPhone?

I have copied the headers to /usr/include and am using iPhone 1.2/2.0
firmware modded using pwnage 2.0.1

What steps will reproduce the problem?
On iPhone...
1. > echo 'main() { printf("Hello, World!\n"); }' > main.c
2. > gcc -o main main.c
3. > ./main
4. Killed
5. > 


What firmware version of itouch/phone?
1.2/2.0 firmware modded using pwnage with cydia, then installed iphone-gcc
via apt-get from command line.

Please provide any additional information below.
Original iPhone 2G.  I was trying to get a simple smssend console
application to build using the toolchain on macosx leopard and experienced
the 'Killed' message.  Then I modified my make file and stuck the whole
application on the iphone and tried to build using iphone-gcc.  It appeared
to build cleaner than on the pc, but same Killed message.  Then I tried to
build the 'hello world' test app using iphone-gcc and same message.

Any help anyone could give would be great.

Original issue reported on code.google.com by [email protected] on 22 Jul 2008 at 9:39

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.