Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
I used to be able just to make a new directory of my code include the .xcodefile and everything would run. That doesn't work now. Heaven knows why but more to the point:

I made a new project; added the old code to the new project; compiled; and get lots warnings about no previous prototype for all my procedures. What gives?
 
The warnings that are turned on by default under XCode 4 are different than under XCode 3. You may only now be seeing these warnings for the first time because under XCode 3 the warning was turned off.


Do you in fact have prototypes for all your functions?


For example, for a function like this:
Code:
double myfunc1(int param1, char *param2) {
  /* ... */
}
Do you have a prototype like this in either a .h file #include'ed by this file, or at the top of this file?
Code:
double myfunc1(int param1, char *param2);
 
thanks.

Also, it seems the prototype should be in the file where it is coded.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.