I cannot compile "C" source file on Mac OS X(10.8.2)

Hi,
I am trying to compile the C source filein terminal, using "cc" or "gcc" command. No luck.
Later on, tried to ran the command, xcrun cc filename.c, the compiler gave an error about header files.

I have tried with /bin/cc and /usr/bin/cc  and tried to find the "CC" command  or "gcc" command or "C++" or "g++" command in the directories. No luck!
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
I have checked the cc binaries in all of the above directories. No luck

Similar Messages

  • UPDATE : Toshiba Recovery Wizard 'cannot read from source file or disk' error (satellite L500)

    UPDATE 2: Phoned Toshiba tech support again, guided by techie to begin the recovery again. Just before phoning I was able to go into recovery options and view the drive setup and all the files that couldn't be read are on the CD so I've no idea why the error kept occuring, and neither did the techie. Fingers crossed it works this time but I'm not overly hopefully given that we've just done exactly the same as I did before.  UPDATE 1: I got into the BIOS and reset everything back to defaults and yay, my toshiba recovery wizard now starts! :-D  On the down side, when trying to do a factory default software / out of the box recovery I continually get error messages with regards to copying the files, for example 
    cannot read from source file or disk
    7z.dll
    Type application extension
    size 585kb
    date modified 7/14/2009 10.26pm
    other read / copy errors include PREINST6.SWM, BOOT_32, BOOTPRIORITY, CHECKMAXPTSIZE, CHGBOOT, CPU, CPUCHECK, CREATEPARTITION, CTRLDRVINFO, DISKWIPE, DMI, DPINST32, EBLIB.DLL, ERRORDIALOG, EW3BOOTSEQ, FWLINK, FWLINK.SYS, GETHDDINFO, GETKEYSTATE, IMAGEX, INFILED, INITRECAREA, KRAIADAPI.DLL ..... at which point I decided to 'skip all' :-/
    Any explanations as to what's going on and how I might be able to fix it would be very much appreciated! :-)  Thank you!
    I have a two and half year old satellite L500 with an Intel i-3 and 4 gigs of RAM, on which I was running Windows 7.
    Admittedly it’s had rather a hard life (I ran some very demanding CAD / graphics software on it) but it had always performed well until just recently, when after suffering several BSOD (which had never happened before), the hard drive failed.
    I partitioned and formatted a brand new hard drive (which is perfectly fine and functions normally when hooked up to another laptop with a SATA to USB cable) and obtained system recovery discs from Toshiba.  Unfortunately, when I try and run the first disc, windows starts to load files but then generates an error screen with the message Error F3-F100-0003 and a request to turn the computer off.  
    When I use the windows Memory Diagnostic to get into the Windows Boot Manager Screen I get the following;
    Windows failed to start.  A recent hardware / software change might be the case.
    To fix the problem
    Insert your windows installation disc and restart your computer
    Choose your language settings and click ‘next’
    Click ‘repair your computer’
    File: \boot\memtest.exe
    Status: 0xc000000f
    Info: the selected entry could not be loaded because the application is missing or corrupt.
    I can also use F8 on startup to get into the advanced boot options but selecting any of them simply results in the F3-F100-0003 error message.  I’ve run a memory test using the UBCD, which tells me the memory is fine, and tried another hard drive (which also works perfectly well in another laptop) but no joy.  On phoning Toshiba support the techie said my hard drive had failed, but as I say, both hard drives are perfectly fine / usable when hooked up to another laptop.  I’m now completely stuck as to what the problem is and how I might resolve it – any advice / suggestions would be most gratefully received! Thank you in advance :-)

    Satellite L655-S5096
    Downloads here.
    the second disc gives me the the "cannot read from source file or disk PREINST8.SWM"
    My best guess is that the disc is not readable. Try copying it to another. Sometimes that works.
    Otherwise, order new discs from Toshiba.
    -Jerry

  • Recovery Disk Error : cannot read from source file or disk HOW TO FIX ISSUE

    I have had my satellite L655-S5096 for some time now.. I had to switch out hard-drives the other day and installed windows 7 home on it from my own disk.  I tried to download all the drivers needed, but the graphics and wifi drivers never worked, so I pulled out the old toshiba disks to start from new with this harddrive.. It gets to asking me for the second disc, then the second disc gives me the the "cannot read from source file or disk PREINST8.SWM"  This is from the "out of the box" setting, which is recommended.  I do not know how to fix this issue besides reinstalling windows 7 from my disc and trying to get the drivers to work again.. however I shouldn't have to since I have the Toshiba recovery disks.. do I need new disks? 
    Yes, I also had the hard drive drivers and all of that installed.. my toshiba reads the HDD just fine.
    ~Drew

    Satellite L655-S5096
    Downloads here.
    the second disc gives me the the "cannot read from source file or disk PREINST8.SWM"
    My best guess is that the disc is not readable. Try copying it to another. Sometimes that works.
    Otherwise, order new discs from Toshiba.
    -Jerry

  • Java.lang.NoClassDefFoundError when compile SQLJ source file

    Always got error message java.lang.NoClassDefFoundError: sun/io/CharToByteConverter
    when using sqlj to compile SQLJ source file.
    The CLASSPATH (partial) .:$ORACLE_HOME/sqlj/lib/translator.zip:$ORACLE_HOME/sqlj/lib/runtime.zip
    I am able to compile the demo TestInstallCreateTable.java and TestInstallJDBC.java but not TestInstallSQLJ.sqlj in the same directory.
    I am using Oracle 8.1.6 R2 client in Linux Intel on Red Hat 6.0. Can anyone explain why this happened ?

    From the forthcoming new version of the SQLJ FAQ:
    "NoClassDefFoundError: sun/io/CharToByteConverter"
    (This is likely a general configuration issue, not something specific to your code.)
    Running sqlj results in the following error message.
    java.lang.NoClassDefFoundError: sun/io/CharToByteConverter
    at sqlj.tools.Sqlj.initializeErrors(Sqlj.java:519)
    This happens if you are running under a JRE environment, and not a full JDK environment. You need to download and install a full JDK environment. Note that the Oracle
    database installation will only set up a Java Runtime Environment. Oracle does not distribute the Java Development Kit - you have to get it from http://java.sun.com
    If that did not help, you'd need to give us a fuller picture of your environmnet (JDK versions, PATH, CLASSPATH settings, etc.).
    Thanks!

  • Compile multiple source files

    sorry, this is maybe a newbie question.
    but iI have a problem compiling an application that use multiple sources files
    for exemple
    the class A is in the file 1
    the class B is in the file 2
    class A uses an instance of the class B
    class B uses an instance of the class A
    so i'm unable to compile these files coz each one tells me he doesn't know about the other
    Is there a way to define prototypes of class or fonctions before their use like in C/C++?
    Or is there another way i didn"t pay attention
    thanks all

    This is a minimal explanation of packages. For a full explanation of packages and how to compile and run Java programs, see this page:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html
    and read the Setting the Classpath and the How Classes are Found topics.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    And a statement to run the program is:
    java myapp.aProgram
    (This can be issued from any directory, as Java will search for the program, starting the search from the classpath directories.)
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

  • StackOverflowException compiling 8000 source file

    I am trying to compile a source file with ~8000 lines. It has many (hundreds) of static members (instances of that class), and methods containing conditional statements to take a string and return the instance of that name. This is generated code, so I do not think I can change it.
    Every time I try to compile it with Maven (Sun JDK 1.4.2_05) I get a java.lang.StackOverflowException. I have tried giving Maven more stack memory via the -Xss option (as much as 10m per thread), but that didn't help at all.
    I commented out 90% of the code and it works fine, so I know it is the size that is the problem.
    Has anyone had to deal with something like this before? If so, how did you fix it?

    Thank you to everyone who has replied. After some experimentation I discovered that the problem is not the 800+ static objects being created - it was the 1000's of lines of nested conditional statements. The generator has been modified to make if, if, if... instead of if, else-if, else-if, ... and all is well. :)
    I do not believe any sort of hard limit was reached, b/c Eclipse had no problem with the file. Also, one of our projects has a source file with 12k lines, and it works fine (though it has a different structure).
    I find it interesting that people are being so critical about the generator, especially since this is only one small piece of its modelling. The generator does far more than just create the key types and values.
    Furthermore, I don't understand the criticism of the code as-is. No, it's not something I'd write myself, nor would I wish to maintain such code - but no one has to! That's what the generator is for. If I want to add or delete a key type/value, I do so in the generator, and then regenerate the code.
    I also don't understand why anyone thinks this code is not object-oriented. Perhaps I just didn't explain it well. All classes representing key types extend AbstractDiscreteValue, so there's inheritance. The reason why all the values exist as static (and final) instances is b/c we never need more than one instance of each value, the values are known at generation time, and all instances are immutable.
    How would any of you construct such a class? Keep in mind that maintenance is not an issue, and most key types (probably 95% or more) have fewer than a dozen values.
    Anyway, thanks again for the help.

  • Bluetooth file exchange cannot activate or send file in mac os 10.4.11

    Hi Can anyone help please?
    I can't send any files from my Mac!
    The bluetooth works, I can receive files but I cannot open the bluetooth file exchange to send files from my Mac!
    I use a Macbook with OS 10.4.11.
    Thank you!

    Hi Can anyone help please?
    I can't send any files from my Mac!
    The bluetooth works, I can receive files but I cannot open the bluetooth file exchange to send files from my Mac!
    I use a Macbook with OS 10.4.11.
    Thank you!

  • Stuck with compiling a source file

    Hi,
    I'm stuck with this strange problem and i desperately need some help.
    My source file is in the D drive inside the package named objectwrite. The source file X.java is extending an abstract class named Y. When i'm trying to compile the files using the command javac objectwrite\ x.java y.java from D drive, it's giving the follopwing error
    javac: invalid flag: ObjectWrite/
    Looking forward for the solution
    Thnks
    Rompom_1

    You have a space between '\' and 'x'

  • Failed to compile J2EE source files

    Hi all, I'm learning J2EE these days. When I followed the tutorials on how to compile source files,
    eg. 1. In a terminal window, go to the j2eetutorial/examples directory.
    2. Type the following command:
    ant converter
    I got a message with title "16 bit MS-DOS Subsystem" and content
    "C:\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application. Choose 'Close' to terminate the application."
    Could anyone tell me what's going on?
    Thanks very much

    The documentation on the javac command has information on the options it provides:
    [http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html]
    Otherwise you could use a tool like Ant to manage the build.

  • Cannot compile C source code program

    This below is my source code.
    =====
    main ()
    printf(" Test");
    =====
    C compiler is Forte Develope 6 Update 2 . After I compile source by cc command . This below is output of C compling.
    #/opt/SUNWspro/bin/cc -o /tmp/main /tmp/main.c
    ld: fatal: library -lc: not found
    ld: fatal: File processing errors. No output written to a.out.
    Could you suggest how to fix this case?

    You can also try the following to get an idea as to where your installed compiler is picking up various libraries:
    #/opt/SUNWspro/bin/cc -# -## -o /tmp/main /tmp/main.c
    You should see some output that looks like the following:
    ### Note: NLSPATH = /opt/SUNWspro/bin/../WS6U2/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/bin/../WS6U2/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
    ### command line files and options (expanded):
    ### /tmp/main.c -o /tmp/main
    /opt/SUNWspro/bin/../WS6U2/bin/acomp -i /tmp/main.c -y-fbe -y/opt/SUNWspro/bin/../WS6U2/bin/fbe -y-xarch=generic -y-o -yt.o -y-s -y-verbose -y-xmemalign=4s -Qy -D__SunOS_5_8 -D__SUNPRO_C=0x530 -D__SVR4 -D__unix -D__sun -D__sparc -D__BUILTIN_VA_ARG_INCR -Xa -D__PRAGMA_REDEFINE_EXTNAME -Dunix -Dsun -Dsparc -D__RESTRICT -I/opt/SUNWspro/WS6U2/include/cc "-g/opt/SUNWspro/bin/../WS6U2/bin/cc -c " -D__SUN_PREFETCH
    ### Note: LD_LIBRARY_PATH = <null>
    ### Note: LD_RUN_PATH = <null>
    /usr/ccs/bin/ld /opt/SUNWspro/WS6U2/lib/crti.o /opt/SUNWspro/WS6U2/lib/crt1.o /opt/SUNWspro/WS6U2/lib/values-xa.o -o /tmp/main /tmp/main.o -Y "P,/opt/SUNWspro/WS6U2/lib:/usr/ccs/lib:/usr/lib" -Qy -lc /opt/SUNWspro/WS6U2/lib/crtn.o
    If the lines beginning with ### Note: LD_LIBRARY_PATH = and ### Note: LD_RUN_PATH = are set to something strange, that could be the cause of your problems. As another poster suggested, you'll want to unset those environment variables and recompile.
    Example:
    # unsetenv LD_LIBRARY_PATH
    # unsetenv LD_RUN_PATH
    or if you're running ksh
    # unset LD_LIBRARY_PATH
    # unset LD_RUN_PATH

  • I cannot open a .mov file from MAC on a PC

    I have a Mac Dual G5 with Mac Os X 10.4.8 and I was making a short HDV movie(only 4Giga) in FCExpress.
    I export the movie in H264 1920 X1080 in the QT Conversion window and save them in a .mov file (with blue QT label).
    After saving I can open and view the movie with the Mac, no problem.
    I make a copy on a DVD for mine friend.
    I will open the movie on his PC but it don't work.
    He had a Pentium Dual 840 3.2 Ghz Window XP Pro service pack 1 and 2, 2wDirectx9 2 giga Ram 256 nVidia Ge Force 6800
    On the PC we install also Quick Time Pro 7.1 for Windows with register number.
    When we activate the .mov file on the PC(.mov file from the Mac) we see the Quick Time window in black or white without image.
    We try many times but we cannot find a solution..
    To day we buy by the Apple Store QT MPEG 2-Playback Component for PC.
    After installation we have every time the same problem, no image in the QT windown.
    What can I do?
    Thanks for assistance
    Rudy
    Pentium   Windows XP Pro   Dell Dimension Dual 840 3.2 Ghz
    Pentium   Windows XP Pro   Dell Dimension Dual 840 3.2 Ghz

    Dear Sir
    I find a solution for the problem.
    What you say is correct, it is a codex problem.
    I download a other program Cineform Aspect HD.199 U$.
    Now I can open easy everyone .mov file on the PC(.mov files from the MAC).
    Mine conclusion: QuickTime Pro for Windows don’t support H264 codex,
    and don’t support any .mov file from the MAC !
    Apple make big publicity on their website for QT Pro 7 for Windowns.
    They say “QT Pro 7 for Windows support H264 codex”.
    I try many days with Apple Support team, they don’t find a solution.
    Good evening and thank you for assistance,
    Rudy

  • I cannot view my source files - all are white!!!!!

    I got Premiere Elements v 9.0 installed on Windows XP last week by IT dept. But something is wrong.
    I cannot view any .wmv or .mov files (havent tried any more yet). I add my clips to the project but when playing them all I get is a white screen. In timeline I can see snapshot images as usual. 
    Can you help us with some hints? I doubt there are any experienced moviemakers at IT at all. I probably need to get the fix and tell them what to do.
    The project settings seems perfect. The clip I added in timeline "shows green" (no rendering needed). So I doubt that is the problem.
    Please help - I need to start up a real project this week.

    When one encounters display issues, the first thing that I recommend checking is the video card/chip's video driver.
    What make/model of video display adapter do you have?
    What is the currently installed video driver?
    Can you go to the video card/chip mfgr's. We site, plug in your card/chip's number, and your OS, and check for an updated driver?
    Note: do not trust Windows, or any utility, to tell you if you have the latest video driver. They will be at least 6 mos. out of date.
    Note also: if you have a Dell, Lenovo, HP, Toshiba, or other mainstream computer company's system, check on their Web sites, as many re-wrap video drivers from nVidia, ATI/AMD and Intel. If you have an Intel integrated graphics chip, you might have difficulty finding a newer driver, but still look for one.
    Do you have a laptop, or desktop computer?
    Good luck,
    Hunt

  • Cannot open iOS garageband files on Mac

    Read various threads; I have GB 2.0.6 on iOS (8.1.3, iPad 2) and OSX 10.0.3 on Mac (Yosemite) with iCloud installed and working mostly.
    I can upload files from iOS GB, and their icons get a tiny cloud sigil, but I can't find them on iCloud website or locallly. There is no GB folder.
    I set up iTunes to File-share GB, and I've shared several files. They show up in iTunes Apps>File Sharing>Garageband Documents, but again I can't find them or export them from iTunes.
    In GB/Mac File>iCloud>Import GarageBand for iOS Song shows a window which says "No Songs"
    Any Suggestions?

    I can upload files from iOS GB, and their icons get a tiny cloud sigil, but I can't find them on iCloud website or locallly. There is no GB folder.
    That is how it is supposed to be, unfortunately.
    GarageBand 10 accesses the GarageBand iOS files, that you share to iCloud, differently. They are not (yet) visible on iCloud Drive.
    Use the File > iCloud menu in GarageBand 10 to access the GarageBand for iOS files.
    See this Help page to share your GarageBand iOS songs to iCloud:  http://help.apple.com/garageband/ipad/2.0/index.html#chsdfe5c2c2

  • The debugger has finished stepping, but it cannot find the source file

    Hi guys, has anyone seen this message while debugging? I've just installed 1.5 and I'm getting it all the time. SQLDeveloper doesn't show on the screen the anonymous block that handles the debugging, even though it seems to be working with it. Tks in advance for your kind advice.

    Hi, I get it during the debugging. In the former version, debugging starts by calling the original function or procedure, and then it goes to an anonymous block, the test block that calls the function/procedure being debugged (usually two anonymous functions.) And the debugger goes step-by-step in the anonymous block.
    But in the new version the debugger works only for the original function and then there is the error of the title, and when you tell the debugger to go ahead anyway (ignore the file,) it goes step-by-step through the anonymous blocks, but nothing is shown on the screen... I am puzzled... I am trying to test it in another PC to see what happens (it seems to be an installation problem)

  • Cannot double click RDP files in Mac RDP 8

    When I double click an RDP file to launch a connection that has to connect through a RDS Gateway the connection fails.
    If I import the same RDP file the I am able to connect through the RDP client, double clicking to connect however does not work.

    Hi,
    What error message do you receive when you double click the .rdp file?
    I suspect that there is something missing when we launch .rdp file directly. We can check the log files for details.
    Microsoft Remote Desktop -> About Microsoft Remote Desktop -> Send log via email
    In addition, in the help document, we can only see import remote desktops.
    Thanks.
    Jeremy Wu
    TechNet Community Support

Maybe you are looking for

  • Unable to install Acrobat Reader 9.3.4

    What ever I do, Acrobat Reader 9.3.4 installation won't execute.  The file would open and process, but thereafter; nothing happens.  I've tried uninstalling Acrobat Reader 9.3.3 using Revo Uninstaller just to make sure that there won't be any issues

  • How do I open a TIF image email attachment using windows photo gallery as the default instead of microsoft office picture manager?

    I have an internet fax program that sends faxes directly to my email as a TIF image attachment. When I download the attachment it lists Microsoft office picture manager as the default program to view the image. I would like to change the default prog

  • Operation Selection Configuration - Please Explain

    I was looking for an example in the ALSB Book (Apress) or through ALSB documentation and cannot find a good definition of the different selections for the "Operation Selection Configuration". The Operation Algorithm (when configuring a Proxy Service)

  • Please could somebody help :(

    I feel like a bit of a dense idiot, I tried charging my ipod on my rents computer, came back and all my songs, playlists were gone. I don't have much of a clue with technical stuff nor if I'm posting in the right place. Any help with this would be re

  • Itunes with iphoto event problem

    Hi. i really need help here. I have the same problem with my ipad & iphone so it's either a problem with itunes or iphoto. everything looks great in iphoto but when i open itunes and go to the photo tab it all looks mad. My events have been duplicate