Xcode Mac OS X 10.7.5 doesn't compile file with math header

Hello!
I've written a simple program (just at the beginning of my programming path). A few people have tested it on their machines, and it works: their Xcode compiles the program. My Xcode does not.
Here is the program.
#include <math.h>
#include <stdio.h>
int main (void)
   float x = 2.55, y1, y2 ;
   int   i = 3, z = 2 ;
         y1 = pow( x, i ) ;
         y2 = pow( x, z ) ;
   float result ;
   result = 3 * y1 - 5 * y2 + 6 ;
   printf ("If x equals %f, then the given polynomial equals %f\n", x, result) ;
   return 0 ;
Here is what I get after trying to compile:
alla [11:41 AM]
95-28-37-123:~ Alla$ gcc Prog3task6add.c -o Prog3task6add
Undefined symbols for architecture x86_64:
"_main", referenced from:
     start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
Besides this program, programs with simple #include <stdio.h> header work perfectly.
I use Mac OS X 10.7.5 Scode 4.6.3
Thank you very much!

Hello!
I have tried to use the flag in the program below. Although the program has no reference to math.h library, it returns the same error message.
/* Program to calculate the average of a set of grades and count the nuber of failing test grades */
#include <stdio.h>
int main (void)
    int number_of_grades, i, grade;
    int grade_total = 0, failure_count = 0 ;
    float average ;
    printf ("How many grades will you be entering? ") ;
    scanf ("%i", &number_of_grades) ;
    for ( i = 1; i <= number_of_grades; ++i )
        printf ("Enter grade #%i: ", i) ;
        scant ("%i", &grade) ;
        grade_total += grade ;
        if ( grade < 65 ) ;
        ++failure_count ;
    average = (float) grade_total / number_of_grades ;
    printf ("\nGrade average = %.2f\n", average) ; // Precision to two decimal points
    printf ("Number of failures = %i\n", failure_count) ;
    return 0 ;
Error message:
Undefined symbols for architecture x86_64:
  "_scant", referenced from:
      _main in cchfawYD.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
I would be grateful for ideas on how to solve this. Can it be due to the older version of git?
Thank you so much!

Similar Messages

  • Google Chrome doesn't open files with any applications

    Hey all,
    After downloading stuff, it is desirable to open the files downloaded; however this is made difficult on my Arch system because Chrome doesn't know what to open the files with, nor does it ask.
    I'm using SLiM, xmonad, and have a rather minimalistic set up.
    Secondary to this, Chrome cannot determine by itself whether it is the default browser application.
    I don't know where I could provide this information to Chrome, Can anybody help?
    Thanks

    have a look here
    http://bbs.archlinux.org/viewtopic.php?id=89053

  • Adobe Illustrator CC 18.1.1 doesn't open files with "cmd O"

    Mac Pro (begin 2009), 2 x 2,26 GHz Quad-Core Intel Xeon, 12 GB 1066 MHz DDR3 ECC, NVIDIA GeForce GT 120 512 MB - OS X Yosemite 10.10.1
    After having updated A.Illustrator CC to latest version I'm not able to open files by using "cmd O" and it's impossible to update linked files.
    Please note that A.Illustrator CC has been updated also on my Mac Pro Book and works perfectly.
    Could you please let me know where is the issue?

    Fettone,
    You may try the list; you may consider going straight to 6).
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Quicktime 7.2 doesn't play files with audio

    I just upgraded quicktime to 7.2 and I can not open files that have audio. Mov files that video only open just fine.
    When I updated quicktime, the installation was "successful". The web test on the apple site says quicktime is installed correctly and displays streams correctly.
    itunes won't boot up
    Final Cut gets stuck booting at the "audio filters" extension
    Safari displays quicktimes video and audio just fine. Apple movie trailers look and sound great.
    I have installed the ilife conflict fix update.
    I am running a G5 with 10.3.9 OSX.

    To Apple Discussions!
    Did you run fsck/repair permissions after the installation? If so, then check out the following:
    KB article - No sound from some applications, but system alert sounds play (Mac OS X 10.3, 10.4)
    Another trick: If you have GarageBand installed, open it (maybe open a GarageBand document) and then quit out of the application.

  • MAC 10.5.7 download problems - just get a file with gibberish after downloading software for my Visor Platinum. Any ideas? (MAC is new to me, Visor is not)

    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

    Hello jnrms and welcome to the Palm forums.
    If I recall correcrly, you are trying to download Palm Desktop 4.2.1 Rev A for Mac OS X.  That installer uses the old Stuff It file compression utility, which no longer works on Mac OS X.
    You'll want to download, install, and use Palm Desktop 4.2.1 Rev D for Mac OS X.  You can download it here.
    Alan G
    Post relates to: Treo 755p (Sprint)

  • Page doesn't submit properly with h:head

    I have a commandlink with target="_blank", which when I have just <head></head> at the top of the xhtml page it works fine it will open a new page or new tab, but when I have <h:head></h:head> when I click the link nothing happens on the page. But if I use just <head> I have issues with my templates. Thanks for the help.
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    To change this template, choose Tools | Templates
    and open the template in the editor.
    -->
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:ice="http://www.icesoft.com/icefaces/component">
        <h:head id="ClientAppraisalsHead">
            <h:outputStylesheet library="css" name="ClientAppraisalsStyle.css" />
            <h:outputStylesheet library="css" name="Templates.css" />
            <title>Client Appraisals</title>
        </h:head>
        <h:body>
            <ui:include src="/Templates/HeaderTemplate.xhtml">
                <ui:param name="headerTitle" value="CLIENT REPORTS" />
            </ui:include>
            <h:form id="MainAppraisalForm">
                <div class="centerBlock">
                    <div class="columnContainer" >
                        <div class="columnLeft">
                            Exclude From Monthly Summaries<br />
                            <h:selectOneListbox id="MonthlyExcludeListBox" value="1" size="10">
                                <f:selectItems value="#{clientReportsController.monthlyExcludeList}" />
                            </h:selectOneListbox>
                        </div>
                        <div class="columnLeft">
                            Exclude From Invoice Appraisals<br />
                            <h:selectOneListbox id="InvoiceExcludeListBox" value="1" size="10">
                                <f:selectItems value="#{clientReportsController.invoiceExcludeList}" />
                            </h:selectOneListbox>
                        </div>
                        <div class="columnRight">
                            Client Codes<br />
                            <h:selectOneMenu id="ClientCodeDropDown" style="width:95px"
                                             value="#{clientReportsController.clientCodeSelected}"
                                             immediate="true"
                                             onchange="this.form.submit();"
                                             valueChangeListener="#{clientReportsController.requery}">
                                <f:selectItems value="#{clientReportsController.clientCodeList}" />
                            </h:selectOneMenu><br />
                            <div  style="padding-top: 7px;padding-bottom: 7px">
                                <h:selectBooleanCheckbox id="AllClientsCheck" value="#{clientReportsController.allClientsValue}"></h:selectBooleanCheckbox>
                                All Clients
                            </div>
                            Report Dates<br />
                            <h:selectOneMenu id="ReportDateDropDown" style="width:95px" value="#{clientReportsController.reportDateSelected}">
                                <f:selectItems value="#{clientReportsController.reportDateList}" />
                            </h:selectOneMenu>
                            <br />
                            <div style="padding-top: 7px">
                                <h:selectBooleanCheckbox id="MonthlySummaryCheck" value="#{clientReportsController.monthlySummaryCheckValue}"></h:selectBooleanCheckbox>
                                Monthly Summary<br />
                                <h:selectBooleanCheckbox id="InvoicesCheck" value="#{clientReportsController.invoiceCheckValue}"></h:selectBooleanCheckbox>
                                Invoices<br />
                                <h:selectBooleanCheckbox id="UnsupervisedAssetsCheck" value="#{clientReportsController.unsupervisedAssetsCheckValue}"></h:selectBooleanCheckbox>
                                Unsupervised Assets<br />
                            </div>
                            <h:commandButton styleClass="commandButtons" action="#{clientReportsController.viewAllMailerTopSheets}" value="View Top Sheet" />
                            <br />
                            <h:commandLink value="test" target="_blank" />
                            <h:commandButton styleClass="commandButtons" action="#{clientReportsController.viewAppraisal}" value="View Report" />
                        </div>
                    </div>
                </div>
            </h:form>
        </h:body>
    </html>

    Differences in rendering abound between IE6 and all other browsers. But this is what I found when I ran your page through w3c validation: http://validator.w3.org/check?uri=http://www.readislam.net/darulhuda/aqeedah1.shtml&charse t=(detect+automatically)&doctype=Inline&group=0
    I often see white turning up as transparent, though mostly in transparent gifs. My ploy in that case is to use a slightly off-white, usually #FFFFFE or some such. I don't know if that will ease your pain, though.
    Beth

  • Picard doesn't create files with a user's non-primary groupid

    Scenario:
    I have a folder in /home/john/music  that contains files that are readable by users in users group.
    I have set permissions this way (setgid):
    drwxr-sr-x 284 john users 12K sep 4 00:03 music
    This way, new files inside that folder belong to "users" group, and not to john's default group (john).
    I use Musicbrainz's Picard to organize my music collection. When adding new files to the collection, they get created with "john" group, and not "users" group, as they should. Why?
    Can I change something in Picard to change this behaviour? There are workarounds for this, I know. But I wanted to know if this behaviour is normal.
    Output of ls -lh /usr/bin/picard:
    -rwxr-xr-x 1 root root 83 abr 22 17:19 /usr/bin/picard
    Last edited by foolosophy (2009-09-05 20:04:32)

    Scenario:
    I have a folder in /home/john/music  that contains files that are readable by users in users group.
    I have set permissions this way (setgid):
    drwxr-sr-x 284 john users 12K sep 4 00:03 music
    This way, new files inside that folder belong to "users" group, and not to john's default group (john).
    I use Musicbrainz's Picard to organize my music collection. When adding new files to the collection, they get created with "john" group, and not "users" group, as they should. Why?
    Can I change something in Picard to change this behaviour? There are workarounds for this, I know. But I wanted to know if this behaviour is normal.
    Output of ls -lh /usr/bin/picard:
    -rwxr-xr-x 1 root root 83 abr 22 17:19 /usr/bin/picard
    Last edited by foolosophy (2009-09-05 20:04:32)

  • If i restore my mac with my already downloaded Mac OS x Lion, Does it delete my current files?

    I recently purchased a MacBook Pro 13", i7, 2.7gHz
    A few days ago i restarted my macbook, All that came up was a Blank white screen.
    When i go into recovery, the recover option are to use the installation cd, which i do not have(they set it up in the shop), To re-install mac OS x Lion or to back up my files with time travel.
    I am wondering if i choose to re-install OS x Lion will it delete all my files and reset it to factory setting?
    Need a reply
    Thanks!

    Reinstalling does not touch your files unless you first erase the hard drive.
    Reinstalling Lion Without the Installer
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alterhatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion: Select Reinstall Lion and click on the Continue button.
    Note: You can also re-download the Lion installer by opening the App Store application. Hold down the OPTION key and click on the Purchases icon in the toolbar. You should now see an active Install button to the right of your Lion purchase entry. There are situations in which this will not work. For example, if you are already booted into the Lion you originally purchased with your Apple ID or if an instance of the Lion installer is located anywhere on your computer.

  • Mac OS X 10.6.3 doesn't recognize my iPod touch 3.1.3

    Help please. My Mac OS X 10.6.3 doesn't recognize my iPod touch 3.1.3, I am using Xcode 3.2.3 now. My iTunes is 9.2.1(5). What will I do?

    Have you tried here:
    Mac OS X v10.6 or later: iOS device not recognized in iTunes after restart
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    Is there any reason your OSX is not updated to the latest 10.6.7 and iTunes to 10.2.X?  That may also help.

  • They sent me a serial number for a windows version of PS Elements when I ordered a mac version.  The serial number doesn't work, not surprisingly, but they don' t seem to care.  I have tried the chat line and have waited for almost a day with no response.

    They sent me a serial number for a windows version of PS Elements when I ordered a mac version.  The serial number doesn't work, not surprisingly, but they don' t seem to care.  I have tried the chat line and have waited for almost a day with no response.  What should I do?

    Look here
    Order product | Platform, language swap

  • I want to upgrade my 2007 Mac desktop to 10.5 Leopard. I am currently running on 10.4.11. I have put the leopard disk into the drive and all it does is make a weird noise and then spits the disk right back out. It doesn't do this with other disks. HELP

    I want to upgrade my 2007 Mac desktop to 10.5 Leopard. I am currently running on 10.4.11. When I put the leopard disk into the drive all it does is make a weird noise and then spits the disk right back out. It doesn't do this with any other discs, only this software. Is it still possible to update this computer?

    Yes. Try Amazon.
    Before you do upgrade to Snow Leopard, make sure your Mac meets the requirements.
    Mac OS X v10.6 Snow Leopard - Technical Specifications
    Make sure the disc you tried using doesn't have any fingerprints or smudges on it. The optical drive can't read the disk otherwise.
    If your Mac won't read the disc, might be a good idea to rule out any problems with the startup disk BEFORE trying to upgrade the system.
    Using Disk Utility to verify or repair disks
    Message was edited by: Carolyn

  • I have been using Aperture 3.3.2 with Mac OS-X 10.7.5.  This version doesn't support RAW with Nikon D7100, I decided to upgrade to 3.4. On downloading, it tells me that to upgrade, I need Aperture Vers.3!  which I have.  What to do??

    I have been using Aperture 3.3.2 with Mac OS-X 10.7.5.  This version doesn't support RAW with Nikon D7100, so I decided to upgrade to 3.4. On downloading, it tells me that in order to upgrade, I need Aperture Version 3, which is what I have.  What is one supposed to do??

    Have you moved or renamed your Aperture 3 version? If it is not installed in the "Applications" folder or not named simply "Aperture", then Software Update will not recognize it.
    Put Aperture back and "Software Update" should find your version.
    Regards
    Léonie

  • Use... I realized that i spent my 27 years for using (fixing) computers. Because the Mac was perfect. After iMac, i was really fine with my computer... But after something, that doesn't bother me, happened. The screen started to get cloudy and black... An

    Hi...
    My name is Turgay and have been using computer since 1982... 2 years ago, because of my friend's advice, i bought an iMac... It was the first Mac that i use... Till that, i was using normal PC's...
    I bought an 24" iMac on July 2009 and started to use... I realized that i spent my 27 years for using (fixing) computers. Because the Mac was perfect. After iMac, i was really fine with my computer... But after something, that doesn't bother me, happened. The screen started to get cloudy and black... And it increased. Because of this i took my iMac to your authorised distributor http://www.bilkom.com.tr...
    They changed my screen but in 2 months it happened 3 times and i wanted them to change my iMac with new one, under customer laws... In our country, the device must be changed with new one if the same problem occurs in 3 months. Because i know the customer satisfaction of Apple, i didn' worry about it but Bilkom refused my will... I spoke with them for 2 months but nothing happened, they just told me, it' not our problem.
    Because of this speech, i sued them on June 2011... Last week, i won the case but just for the return of invoince... It costs 3.200 Turkish Liras (1.800$) and there's no 24" iMac unused... Bilkom again refused to give me an iMac... I thought that Apple's customer satisfaction can't be like this... I didn't write anything to Apple till now but if i can't get an iMac, i must return to normal PC after 2 years... And i don't want that... I offered an iMac 27" with core i7... No matter Bilkom accepts or not, they don't care of me... I'm a customer, they should do... I've never seen such a like company. I hope the real Apple will help my problem and save me from Bilkom...
    Waiting for your reply... Thanks and regards...
    Turgay Kala
    General Manager

    Unfortunately, you are not communicating with Apple here - we are all other users volunteering our time to help with technical problems.
    Here is a list of Apple contacts; there is no email address  - you will need to write a letter to their corporate headquarters or call them:
    http://www.apple.com/contact/
    Although, it appears that your problem is with a third party store and that you have won in court - did you get your money back? 24" iMacs have not been made since 2009 or 2010. Now there are 21" and 27" iMacs.

  • HT1338 I'm trying to download java on my Mac machine but the software update doesn't show me anything. Please advise what I should do to get the application.

    I'm trying to download java on my Mac machine but the software update doesn't show me anything. Please advise what I should do to get the application.

    If you can run it under chrome, you have java installed.
    There was some malware that exploited an older version of Java (not javascript) running in a Browser. Since few people use it Apple turned off Java by default in the Safari Browser.
    If you need it for something, just turn it back on in Safari preferences (inside Safari). After a few months of non-use, you may find it has turned itself off again.

  • Why can't I open and retrieve my files from iPhoto and my address book after importing the files from my Power mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    Why can't I open and retrieve my files from iPhoto and my Address Book after importing the files from my Power Mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    For your addressbook, export the files to vCard on the PowerMac, then bring them over to your Mac Pro. For your iPhoto, copy the Users -> yourname -> Pictures folder to your Desktop on the Mac Pro, and open iPhoto on the Mac Pro holding the command and option keys.  Select the library file from that Pictures folder and open it.  It should import all the pictures into iPhoto as part of the rebuild process.  Other PowerPC to Intel migration issues are covered here: https://discussions.apple.com/docs/DOC-2295

Maybe you are looking for

  • Trial Balance Closing

    Hi all expert, I have 5 company database and I already combine into one. Now the 5 of company I need to do a closing for TB, may I know how? Example:- TRADE DEBTORS - 1,000.00 TRADE DEBTORS INTERCO - 2,000.00 AR CLEARING - 3,000.00 TRADE CREDITOR - 5

  • Using Text fields in SWT

    Well, the people over on the Swing forum didn't like when I put this over there, and I can't find a dedicated SWT forum, so I hope I can get an answer over here... In my GUI (developed using SWT), I have a Text field called date. It appears in the wi

  • System property in managed server

    I have a little problem with my managed server. I want to put this "-Dsteria.log4j.configuration=%WL_HOME%\user_domains\NesDomain\log4j.properties" "-Dsteria.log4j.interval=30000", in the start script to the managed server, but I can't get it to work

  • Hi newb here , Can anyone help with Port Forwardin...

    Hi guys Newb here on Broadband Option 3 . New to the world of BTorrents ( hope thats not a dirty word ) and just need some help on Port Forwarding with the Curved Blue Voyager ( latest one I think ) Problem is I can't seem to upload anything back and

  • Regarding Visual voice mail

    Hi All, Can anyone expalin me what is visual voice mail? How it works? Iwant to implement this feature so how should i proceed for this? regards Anil R