Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Compiler Help Needed (http://www.chiefdelphi.com/forums/showthread.php?t=24881)

KevinB 08-02-2004 22:07

Re: Compiler Help Needed
 
Quote:

Originally Posted by deltacoder1020
... just do what some crazy state legislature tried to do ...

Although Alabama's state legislature is pretty darn stupid somtimes ... the story that floated around the internet about us trying to do that .... is fake. :)

deltacoder1020 08-02-2004 23:59

Re: Compiler Help Needed
 
Quote:

Originally Posted by KevinB
Although Alabama's state legislature is pretty darn stupid somtimes ... the story that floated around the internet about us trying to do that .... is fake. :)

i'm not talking about alabama.

Jeff McCune 09-02-2004 11:09

Re: Compiler Help Needed
 
Quote:

Originally Posted by Random Dude
Umm.. But (22/7) evaluates to (3).

My #define shouldn't include ( )'s. Then, if you use PI in an equation, it'll work just fine even though it's integer math.

#define PI 22 / 7
#define DIAMETER 10

circ = DIAMATER * PI; /* circ = 10 * 22 / 7 */

Darkman_X000 09-02-2004 12:14

Re: Compiler Help Needed
 
Ok, thanks for the info guys, but my problem still isn't fixed. I still get the error about having multiple definitions, even though I don't. I have included the preprocessor directives #ifndef, #define, #endif to prevent such nonsense from bothering me, but to no avail. I have written several functions that I NEED to make my robot work right, and it is extremely frustrating to have the compiler return errors that are unfounded.
:mad:
Please help!

My code is presented on the previous page, and I don't want to re-post it because it is long... Please check it out and tell me why the function "newValue" keeps coming up as having "multiple definitions"!

:confused:

Thanx in advance!!!!!!

deltacoder1020 09-02-2004 12:39

Re: Compiler Help Needed
 
notice that the error you are getting is a link error - this means that the multiple definitions are in different files - are you sure you didn't accidentally name something (even a variable) newValue somewhere else?

Mark McLeod 09-02-2004 13:25

Re: Compiler Help Needed
 
Quote:

Originally Posted by Darkman_X000
Ok, thanks for the info guys, but my problem still isn't fixed. I still get the error about having multiple definitions, even though I don't. I have included the preprocessor directives #ifndef, #define, #endif to prevent such nonsense from bothering me, but to no avail. I have written several functions that I NEED to make my robot work right, and it is extremely frustrating to have the compiler return errors that are unfounded.
:mad:
Please help!

My code is presented on the previous page, and I don't want to re-post it because it is long... Please check it out and tell me why the function "newValue" keeps coming up as having "multiple definitions"!

:confused:

Thanx in advance!!!!!!

The code you posted here compiles without a problem.
You need to post or email one of us your whole project as a zip file.
Strip out the project and .o files before you Winzip it if you need to keep the size down.

Astronouth7303 10-02-2004 07:35

Re: Compiler Help Needed
 
I don't know. It looks like the only defs are the prototype and the actual code. I would say try putting the prototype in the same file as the sub.

Greg Ross 10-02-2004 11:16

Re: Compiler Help Needed
 
Quote:

Originally Posted by Mark McLeod
The code you posted here compiles without a problem.
You need to post or email one of us your whole project as a zip file.
Strip out the project and .o files before you Winzip it if you need to keep the size down.

I second the motion. There must be something going behind the scenes of what you've shown us.

Darkman_X000 10-02-2004 12:15

Re: Compiler Help Needed
 
All right guys, it seems to be working now. I just deleted all #include "userutilities.c" directives and replaced them with #include "userutilities.h" directive where necessary.

So... now I am no longer getting the "multiple definition" errors that were driving me insane. Thanks for your help!!! :D

Mark McLeod 10-02-2004 12:19

Re: Compiler Help Needed
 
Quote:

Originally Posted by Darkman_X000
All right guys, it seems to be working now. I just deleted all #include "userutilities.c" directives and replaced them with #include "userutilities.h" directive where necessary.

So... now I am no longer getting the "multiple definition" errors that were driving me insane. Thanks for your help!!! :D

That makes sense.

Now that you're no longer being driven insane, how are you getting there?;)

Good Luck!


All times are GMT -5. The time now is 23:58.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi