|
|
View previous topic :: View next topic |
Author |
Message |
Requan
Joined: 11 May 2008 Posts: 74
|
ex13b.c problem to run |
Posted: Tue May 15, 2012 1:51 am |
|
|
Dear all,
I bought CCS 3.3V Ethernet Controler development kit.
I tried to run ex13b.c file (without change anything) but i get errors as follow:
>>> Warning 201 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 189(1,1): Assignment inside relational expression
--- Info 300 "C:\Program Files\PICC\drivers\string.h" Line 15(7,13): More info: First Declaration of strupr
*** Error 31 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 302(1,2): Identifier is already used in this scope
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 306(7,8): Expecting a (
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 306(9,10): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(5,10): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(10,11): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(12,13): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(15,16): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(17,18): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(18,19): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 307(21,22): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 308(5,6): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(9,11): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(12,13): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(14,15): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(17,18): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(20,23): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(24,26): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(29,30): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(32,35): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(35,36): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 309(37,38): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(13,14): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(16,17): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(19,20): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(20,23): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(24,25): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(26,29): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(29,30): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 310(30,31): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 311(5,6): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 311(8,9): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 312(5,6): Expecting a declaration
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 313(5,11): Expecting a declaration
*** Error 48 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 313(12,13): Expecting a (
*** Error 43 "D:\Elektronika\My Designs\c++\Marcin_CCS\Testy\TCP Server\tcpip\helpers.c" Line 314(1,2): Expecting a declaration
35 Errors, 1 Warnings.
Build Failed.
I don't understand because i checked and this functions have declaration.
Best Regards,
Martin |
|
|
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
|
Posted: Tue May 15, 2012 4:27 am |
|
|
Paste lines 302 to 314. I suppose you've made an error with copying the code.
Stoyanoff |
|
|
Requan
Joined: 11 May 2008 Posts: 74
|
|
Posted: Tue May 15, 2012 5:45 am |
|
|
Thanks for reply.
Here You are:
Code: | char *strupr (char *s)
{
char c;
char *t;
t = s;
while( (c = *t) )
{
if ( (c >= 'a' && c <= 'z') )
*t -= ('a' - 'A');
t++;
}
return s;
} |
I use PIC 18F67J60 and of course set proper value in ccstcpip.h.
I didn't change anything. i run example only. |
|
|
Requan
Joined: 11 May 2008 Posts: 74
|
|
Posted: Thu May 17, 2012 3:17 am |
|
|
When I remove this function it solved problem. |
|
|
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
|
Posted: Thu May 17, 2012 3:37 am |
|
|
It's impossible the name of a function to be a pointer. Remove the "*" from the name of the function.
Stoyanoff |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1349
|
|
Posted: Thu May 17, 2012 6:14 am |
|
|
He's returning a char*...the function name is fine. Based on the errors though, it sounds like strupr is already defined somewhere. Try just changing the name to strupr2 and see if it compiles. |
|
|
Requan
Joined: 11 May 2008 Posts: 74
|
|
Posted: Tue May 22, 2012 7:34 am |
|
|
jeremiah
Yes it helps. Thank You |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|