CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ex13b.c problem to run

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Requan



Joined: 11 May 2008
Posts: 74

View user's profile Send private message

ex13b.c problem to run
PostPosted: Tue May 15, 2012 1:51 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 15, 2012 4:27 am     Reply with quote

Paste lines 302 to 314. I suppose you've made an error with copying the code.
Stoyanoff
Requan



Joined: 11 May 2008
Posts: 74

View user's profile Send private message

PostPosted: Tue May 15, 2012 5:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu May 17, 2012 3:17 am     Reply with quote

When I remove this function it solved problem.
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Thu May 17, 2012 3:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu May 17, 2012 6:14 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 22, 2012 7:34 am     Reply with quote

Arrow jeremiah
Yes it helps. Thank You
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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