×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Question An compile error from RVCT2.2

    Hi,

    I encounter lots of this compiler error:
    "C:\..\s32file.inl", line 493: Error: #304: no instance of function template "ConstCast" matches the argument list
    argument types are: (const RFile)
    {return MUTABLE_CAST(RFile&,iFile);}

    My command line looks like this:
    -O2 --cpu 6 -c --diag_suppress 1300,611,997 --preinclude C:\Symbian\9.2\S60_3rd_FP1\Epoc32\include\rvct2_2\rvct2_2.h a.cpp

    Do I need to enable any feature or disable something in the command line?

    Thanks.

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: An compile error from RVCT2.2

    MUTABLE_CAST arguments are wrong.

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Re: An compile error from RVCT2.2

    I don't think the arguments are wrong.

    If I use gcce compiler, I don't have this error. Besides, the file, s32file.inl, come with the SDK. I never change it.

    Thanks anyways.

  4. #4
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: An compile error from RVCT2.2

    Hi,

    Hope this link give you some idea.

    http://www.newlc.com/forum/rvct2-2
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Unhappy Re: An compile error from RVCT2.2

    Quote Originally Posted by RB_Sahu View Post
    Hi,

    Hope this link give you some idea.

    http://www.newlc.com/forum/rvct2-2
    The post there just suggests to use GCCE compiler. But I don't have any problem using GCCE compiler in command line or with the abld tool. I don't have any problem using RVCT 2.2 compiler with the abld tool. My problem is the errors if I just use command line to compile the code with RVCT 2.2 compiler, it gets lots of errors.

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: An compile error from RVCT2.2

    can you send the version of RVCT you are using armcc --help like "ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 435]"

  7. #7
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Re: An compile error from RVCT2.2

    Here is the output of armcc --help:

    ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 435]

    Usage: armcc [options] file1 file2 ... filen
    Main options:

    --arm Generate ARM code
    --thumb Generate Thumb code
    --c90 Switch to C mode (default for .c files)
    --cpp Switch to C++ mode (default for .cpp files)
    -O0 Minimum optimization
    -O1 Restricted optimization for debugging
    -O2 High optimization
    -O3 Maximum optimization
    -Ospace Optimize for codesize
    -Otime Optimize for maximum performance
    --cpu <cpu> Select CPU to generate code for (eg. ARM9E/ARM10E)
    --cpu list Output a list of all the selectable CPUs
    -o <file> Name the final output file of the compilation
    -c Compile only, do not link
    --asm Output assembly code as well as object code
    -S Output assembly code instead of object code
    --interleave Interleave source with disassembly (use with --asm or -S)
    -E Preprocess the C source code only
    -D<symbol> Define <symbol> on entry to the compiler
    -g Generate tables for high-level debugging
    -I<directory> Include <directory> on the #include search path
    For support please contact support-sw@arm.com
    Software supplied by: ARM Limited

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: An compile error from RVCT2.2

    Arm Version looks fine to me .

    Can you paste the function in which you are getting error.

  9. #9
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Re: An compile error from RVCT2.2

    I know why I get this error. The reason is that the compiler doesn't include the header file, abc.h, for the source file, abc.inl.

    But I still don't have a good solution yet. Now, I can only add each header manually. I don't think I should include every header files myself. The compiler should be able to this. It's just like compile abc.c, and the compiler automatically includes abc.h.
    Last edited by aliothliu; 2008-07-15 at 21:23.

  10. #10
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: An compile error from RVCT2.2

    Quote Originally Posted by aliothliu View Post
    I know why I get this error. The reason is that the compiler doesn't include the header file, abc.h, for the source file, abc.inl.

    But I still don't have a good solution yet. Now, I can only add each header manually. I don't think I should include every header files myself. The compiler should be able to this. It's just like compile abc.c, and the compiler automatically includes abc.h.
    do you mean even if you have not included the abc.h in your abc.c compiler should be able to add it ?

  11. #11
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Re: An compile error from RVCT2.2

    Yes. That's what I mean.
    Last edited by aliothliu; 2008-07-16 at 14:56.

  12. #12
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: An compile error from RVCT2.2

    Quote Originally Posted by aliothliu View Post
    Yes. That's what I mean.
    I donot think you can do it.

    Quote Originally Posted by aliothliu View Post
    Why does this statement
    {return (const CEikDialog*)const_cast<MEikAlertWin*>(this)->AsEikDialog();}
    cause the error, no instance of function template "ConstCast" matches the argument list argument types are: (const MEikAlertWin *)?

    const_cast is a c++ keyword, but the compiler takes it as a function template??
    as it says symbian does not understand const_cast, try CONST_CAST

  13. #13
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Re: An compile error from RVCT2.2

    I have fixed the bug. Our framework redefined const_cast for constcast to support other arm compiler. After I disabled it, it works well.

    Thanks.

Similar Threads

  1. Compile problems...
    By malloc in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2009-11-17, 12:47
  2. {lval} HBufC16 *)' does not match. compile error
    By doesitmatter in forum Symbian
    Replies: 3
    Last Post: 2008-02-11, 11:21
  3. How To Compile Rss file
    By pavan in forum Symbian
    Replies: 1
    Last Post: 2006-10-14, 13:34
  4. Compile error when upgrading from NDS 1.1 to Carbide.vs 2.0.1
    By ericcwhung in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-04-24, 07:58
  5. to many include paths cannot compile
    By brookp in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2005-05-31, 22:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×