bugpi-calculator - Bugs: bug #20216, Compiler Errors

 
 

bug #20216: Compiler Errors

Submitter:  Ryan Niebur <ryan52>
Submitted:  Wed 20 Jun 2007 02:42:55 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 20 Jun 2007 02:48:30 AM UTC, comment #1: 

Never mind that question.
That was really stupid of me!

Ryan Niebur <ryan52>
Wed 20 Jun 2007 02:42:55 AM UTC, original submission:  

I get the following compiler errors/warnings:

In file included from main.c:38:
algorithms.h:9: error: two or more data types in declaration specifiers
make: * [main.o] Error 1

Then, after I fixed that and retried the compile I got:

cc -g -pedantic -Wall -O2  -c -o main.o main.c
cc -g -pedantic -Wall -O2  -c -o mymath.o mymath.c
cc -g -pedantic -Wall -O2  -c -o algorithms.o algorithms.c
algorithms.c: In function ‘john_wallis’:
algorithms.c:142: error: ‘i’ undeclared (first use in this function)
algorithms.c:142: error: (Each undeclared identifier is reported only once
algorithms.c:142: error: for each function it appears in.)
make: * [algorithms.o] Error 1

Finally, after I fixed that I got a successful build!

I have one question about it also. Why are you using a long double for i when i is storing whole numbers?

Ryan Niebur <ryan52>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ryan52 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-06-20 ryan52 Carbon-CopyRemoved ryan52 -
    2007-06-20 ryan52 Carbon-Copy- Added ryan52

    Back to the top

    Powered by Savane 3.13-8ccc.
    Corresponding source code