Effectv don't compile. error: conflicting types for 'trunc'

hello all.
i'm full newbie, so please, be kind
I try to install effectv from AUR, but when i try to 'make' - i receive error:
error: conflicting types for 'trunc'
then i download sources and try to compile them - and again receive this error.
Please advice, what should i do to correct this error?
Thank you and sorry for my english.

Please contact the author of the PKGBUILD to have it changed in the AUR. This fixes your issues:
PKGBUILD
# Contributor: Luiz Ribeiro <luizribeiro>
pkgname=effectv
pkgver=0.3.11
pkgrel=1
pkgdesc="EffecTV is a real-time video effector. You can watch TV or video through amazing effectors."
url="http://effectv.sourceforge.net/"
depends=('sdl')
makedepends=('nasm')
conflicts=()
license=
install=
source=('http://jaist.dl.sourceforge.net/sourceforge/effectv/effectv-0.3.11.tar.gz'
'gcc.patch' 'timedist.patch')
md5sums=('71570b71009df0f1ff53e31de6f50cee')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np0 < $startdir/src/gcc.patch || return 1
patch -Np0 < $startdir/src/timedist.patch || return 1
sed -i -e 's_/usr/local_/usr_g' config.mk
make || return 1
mkdir -p $startdir/pkg/usr/bin
mkdir -p $startdir/pkg/usr/man/man1
make install INSTALL=/bin/install -c DESTDIR=$startdir/pkg || return 1
gcc.patch : fixes compile problem
--- utils.c.orig 2006-02-14 15:06:17.000000000 +0100
+++ utils.c 2006-08-30 22:47:19.514145536 +0200
@@ -26,7 +26,7 @@
* HSI color system utilities
-static int trunc(double f)
+static int trunc_color(double f)
int i;
@@ -44,9 +44,9 @@
Gv=1+S*sin(H);
Bv=1+S*sin(H+2*M_PI/3);
T=255.999*I/2;
- *r=trunc(Rv*T);
- *g=trunc(Gv*T);
- *b=trunc(Bv*T);
+ *r=trunc_color(Rv*T);
+ *g=trunc_color(Gv*T);
+ *b=trunc_color(Bv*T);
timedist.patch : fixes bug
This is a quick fix for bugs of effectv-0.3.11. TimeDistortion has a border
crossing bug and a buffer uninitializing bug.
Index: effects/timedist.c
===================================================================
--- effects/timedist.c (revision 478)
+++ effects/timedist.c (working copy)
@@ -27,7 +27,16 @@
static int plane;
static int *warptime[2];
static int warptimeFrame;
+static int bgIsSet;
+static int setBackground(RGB32 *src)
+{
+ image_bgset_y(src);
+ bgIsSet = 1;
+
+ return 0;
+}
+
effect *timeDistortionRegister(void)
effect *entry;
@@ -70,6 +79,7 @@
plane = 0;
image_set_threshold_y(MAGIC_THRESHOLD);
+ bgIsSet = 0;
state = 1;
return 0;
@@ -94,6 +104,9 @@
int *p, *q;
memcpy(planetable[plane], src, PIXEL_SIZE * video_area);
+ if(!bgIsSet) {
+ setBackground(src);
+ }
diff = image_bgsubtract_update_y(src);
p = warptime[warptimeFrame ] + video_width + 1;
@@ -109,7 +122,7 @@
q += 2;
- q = warptime[warptimeFrame ^ 1] + video_width + 1;
+ q = warptime[warptimeFrame ^ 1];
for(i=0; i<video_area; i++) {
if(*diff++) {
*q = PLANES - 1;

Similar Messages

  • Error: conflicting types for 'myFunctionOne'

    Hello,
    The LabWindows/CVI 2013 help page for C Language Extensions appears to show function overloading being supported in the C99 extensions:
     "Function Overloading in C | Yes"
    The table in the following link shows the same thing:
    http://digital.ni.com/public.nsf/allkb/73AEAD30C8AF681A86257BBB0054A26B
    I tried compiling a source file with the following overloaded function definitions with C99 extensions enabled in the Build Options:
     void myFunctionOne(double d) {
      printf ("Value = %f\n", d);
     void myFunctionOne(int d) {
      printf ("Value = %d\n", d);
    and I get the error:
     "conflicting types for 'myFunctionOne'
    Is function overloading truly supported, and if so, how does one enable it?
    Thanks,
    Mark B.
    Solved!
    Go to Solution.

    Hello Mark,
    You have to add __attribute__((overloadable)) at the definitions of the functions you want to overload.
    void __attribute__((overloadable)) myFunctionOne(double d) {
    printf ("Value = %f\n", d);
    void __attribute__((overloadable)) myFunctionOne(int d) {
    printf ("Value = %d\n", d);
    You can see an examples of clang extensions here.
    Constantin

  • Studio 12.3 C compiler: internal compiler error: vector type in ty_build_co

    Trying to compile libspeex, the C compiler errors out with:
    cc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I.. -I/usr/pkg/include -xO3 -m64 -xarch=native -xdepend -xvector -xtrigraphs -xannotate=no -w -features=no%conststrings,extensions -xc99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -c vq.c -KPIC -DPIC -o vq.o
    "vq_sse.h", line 37: internal compiler error: vector type in ty_build_composite()
    cc: acomp failed for vq.c
    The only way I was able to get it to compile was to remove -x03 -xarch=native -xvector completely (all three had to be removed):
    cc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I.. -I/usr/pkg/include -m64 -xdepend -xtrigraphs -xannotate=no -w -features=no%conststrings,extensions -xc99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -c vq.c -KPIC -DPIC -o vq.o

    It looks like you have run into bug 15757788, which has been fixed internally but does not seem to have been released in a patch yet. The bug report does not list a workaround.
    If you have a support contract, you can view the status of the bug at My Oracle Support, and you can check periodically for the next patch. You can also file a request to be notified when a patch is available, and possibly get a pre-release patch to test.

  • Warning: Compiler errors during type creation

    Hello all,
    when I run the following little script in my Oracle 8.1.7 SQL plus spreadsheet I get the following error message:
    "Warning: Compiler errors during type creation". (This is my offhand translation from German, since I have a German version)
    There is no further hint as to what the nature of the error is or how I can fix it, but for sure I can't use the type I tried to define.
    Can anybody help?
    Here is the code:
    set serveroutput on ;
    create or replace type DataPoint as object(
    name varchar2(20)
    create or replace type DataPointList as table of DataPoint ;
    create or replace type ElementType as object (
    TypeName varchar(20),
    Datapoints DataPointList
    create or replace type ElementList as table of ElementType ;
    Regards,
    Norbert Ploett
    null

    create or replace type DataPoint as object(
    name varchar2(20)
    create table DataPointList of DataPoint ;
    create or replace type ElementType as object (
    TypeName varchar(20),
    Datapoints DataPointList
    create table ElementList of ElementType ;
    This should work in the given case
    Ravi
    Regards,
    Norbert Ploett
    Regards,
    Norbert Ploett
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Norbert.Ploett:
    Hello all,
    when I run the following little script in my Oracle 8.1.7 SQL plus spreadsheet I get the following error message:
    "Warning: Compiler errors during type creation". (This is my offhand translation from German, since I have a German version)
    There is no further hint as to what the nature of the error is or how I can fix it, but for sure I can't use the type I tried to define.
    Can anybody help?
    Here is the code:<HR></BLOCKQUOTE>
    null

  • Error:movement type for follow-on document missing

    Hello,
    Can anyone help me that i got the error message while creating the shopping cart from INTERNAL GOODS/SERVIES after adding the product id in the second step.
    Error :"movement type for follow-on document missing"

    i define BSA in ppoma_bbp as
    BSA: oneclnterp\nb
    and i define this number range Supplier Relationship Management ® SRM Server ® Cross-Application Basic Settings ® Number Ranges ® SRM Server Number Ranges ® Define Number Ranges for Shopping Carts and Follow-on Documents
    NO
    From Number
    To Number
    Current Number
    Ext
    Description
    (not in the table)
    01
    0010000000
    0019999999
    Shopping cart
    LO
    0020000000
    0029999999
    Faulty local PO
    PO
    4100000000
    4199999999
    Backend PO
    RQ
    0090000000
    0099999999
    Backend Purchase requisition
    RS
    9600000000
    9999999999
    Backend Reservation
    SE
    0200000000
    0209999999
    Backend Service PO

  • Compiled Error in Xcode for iphone game and other questions

    Dear all,
    Hi, I am a newbie of xcode and objective-c and I have a few questions regarding to the code sample of a game attached below. It is written in objective C, Xcode for iphone4 simulator. It is part of the code of 'ball bounce against brick" game. Instead of creating the image by IB, the code supposes to create (programmatically) 5 X 4 bricks using 4 different kinds of bricks pictures (bricktype1.png...). I have the bricks defined in .h file properly and method written in .m.
    My questions are for the following code:
    - (void)initializeBricks
    brickTypes[0] = @"bricktype1.png";
    brickTypes[1] = @"bricktype2.png";
    brickTypes[2] = @"bricktype3.png";
    brickTypes[3] = @"bricktype4.png";
    int count = 0;`
    for (int y = 0; y < BRICKS_HEIGHT; y++)
    for (int x = 0; x < BRICKS_WIDTH; x++)
    - Line1 UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]];
    - Line2 bricks[x][y] = [[[UIImageView alloc] initWithImage:image] autorelease];
    - Line3 CGRect newFrame = bricks[x][y].frame;
    - Line4 newFrame.origin = CGPointMake(x * 64, (y * 40) + 50);
    - Line5 bricks[x][y].frame = newFrame;
    - Line6 [self.view addSubview:bricks[x][y]]
    1) When it is compiled, error "ImageCache undeclared" in Line 1. But I have already added the png to the project. What is the problem and how to fix it? (If possible, please suggest code and explain what it does and where to put it.)
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    For instance, returns one of the file name bricktype1.png to the image object? If true, what is the max value of "count", ends at 5? (as X increments 5 times for each Y). But then "count" will exceed the max 'index value' of brickTypes which is 3!
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    Thanks
    North

    Hi North -
    macbie wrote:
    1) When it is compiled, error "ImageCache undeclared" in Line 1. ...
    UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]]; // Line 1
    The compiler is telling you it doesn't know what ImageCache refers to. Is ImageCache the name of a custom class? In that case you may have omitted #import "ImageCache.h". Else if ImageCache refers to an instance of some class, where is that declaration made? I can't tell you how to code the missing piece(s) because I can't guess the answers to these questions.
    Btw, if the png file images were already the correct size, it looks like you could substitute this for Line 1:
    UIImage *image = [UIImage imageNamed:brickTypes[count++ % 4]]; // Line 1
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    Though you don't show the declaration of brickTypes, it appears to be a "C" array of NSString object pointers. Thus brickTypes[0] is the first string, and brickTypes[3] is the last string.
    The expression (count++ % 4) does two things. Firstly, the trailing ++ operator means the variable 'count' will be incremented as soon as the current expression is evaluated. Thus 'count' is zero (its initial value) the first time through the inner loop, its value is one the second time, and two the third time. The following two code blocks do exactly the same thing::
    int index = 0;
    NSString *filename = brickTypes[index++];
    int index = 0;
    NSString *filename = brickTypes[index];
    index = index + 1;
    The percent sign is the "modulus operator" so x%4 means "x modulo 4", which evaluates to the remainder after x is divided by 4. If x starts at 0, and is incremented once everytime through a loop, we'll get the following sequence of values for x%4: 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ...
    So repeated evaluation of (brickTypes[count++ % 4]) produces the sequence: @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", ...
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    Line 2 allocs an object of type UIImageView and specifies the data at 'image' as the picture to be displayed by the new object. Since we immediately assign the address of the new UIImageView object to an element of the 'bricks' array, that address isn't stored in any named variable.
    The new UIImageView object is not associated with the name of the png file from which its picture originated. In fact the UIImage object which inited the UIImageView object is also not associated with that png filename. In other words, once a UIImage object is initialized from the contents of an image file, it's not possible to obtain the name of that file from the UIImage object. Note when you add a png media object to a UIImageView object in IB, the filename of the png resource will be retained and used to identify the image view object. But AFAIK, unless you explicitly save it somewhere in your code, that filename will not be available at run time.
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    In Line 2 we've set the current element of 'bricks' to the address of a new UIImageView object which will display one of the 4 brick types. By default, the frame of a UIImageView object is set to the size of the image which initialized it. So after Line 2, we know that frame.size for the current array element is correct (assuming the image size of the original png file was what we want to display, or assuming that the purpose of [ImageCache loadImage:...] is to adjust the png size).
    Then in Line 3, we set the rectangle named newFrame to the frame of the current array element, i.e. to the frame of the UIImageView object whose address is stored in the current array element. So now we have a rectangle whose size (width, height) is correct for the image to be displayed. But where will this rectangle be placed on the superview? The placement of this rectangle is determined by its origin.
    Line 4 computes the origin we want. Now we have a rectangle with both the correct size and the correct origin.
    Line 5 sets the frame of the new UIImageView object to the rectangle we constructed in Lines 3 and 4. When that object is then added to the superview in Line 6, it will display an image of the correct size at the correct position.
    - Ray

  • Compiler error: incompatible types

    When I try to compile this code it gives the error "incompatible types".
    import java.util.ArrayList;
    public class Poly {
         public static void main (String args[]) {
              Number integer = new Integer(1);
              ArrayList<Number> integers = new ArrayList<Integer>();
    }Assigning a Number object an Integer which extends Number works fine.
    But when I try to assign an ArrayList<Number> object an ArrayList<Integer> object it gives an imcompatible types error.
    Shouldn't it work?
    Edited by: aexyl93 on Jun 7, 2010 2:00 AM
    Edited by: aexyl93 on Jun 7, 2010 2:05 AM

    aexyl93 wrote:
    Thanks for the quick replies.
    I've never seen ArrayList<? extends obj> before.Nitpick: it's not "? extends obj" it's "? extends SomeClass".
    "obj" kind of implies that you could use a variable/field here, which is wrong.
    I thought it would be able to hold an object which extends what it's supposed to hold.A List<? extends Number> could contain any class that extends Number (as well as Number itself if it weren't an abstract class). However you can't add anything (except null), because you don't know the concrete type at this point.

  • Problem cf10 installation xml error - Conflicting values for output property method

    We just completed a ColdFusion 10 installation on Windows Server 2008 R2. After taking care of some configuration issues, we're now faced with a problem that we can't figure out. Searches on Google for the error returned almost nothing.
    The error occurs when xmltransform is called in a CFC file. The error we get from CF is:
    An error occured while Transforming an XML document
                 Failed to compile stylesheet. 1 error detected.            
    It's not very helpful. In the coldfusion-error.log file, we have this entry:
    Error at xsl:output on line 2 column 193
      XTSE1560: Conflicting values for output property method
    Anyone have any ideas how to fix this? Is it something simple that we overlooked, or a fundamental difference in the way CF10 handles xmltransform?
    Thanks,
    Jamie Carter

    Here is the XSLT:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
    <xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" media-type="application/xhtml+xml" />
    <xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\aacc_main_browse.xsl" />
    <xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\rotator\aacc_home_rotator.xsl" />
    <xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\nav\aacc_home_side_menu.xsl" />
    <xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\news\aacc_home_news.xsl" />
    <xsl:template match="page">
      <!-- homepage --> 
            <div class="home_rotator_nav_div">
              <div class="nav" id="nav"><xsl:comment>nav div</xsl:comment></div>
            </div>
            <div id="home_rotator_container">
              <xsl:call-template name="home_side_menu" />
                <xsl:choose>
                  <xsl:when test="string-length(text/child::*[attribute::seq=12])=0" >
                    <xsl:comment>emergency alert not active</xsl:comment>
                  </xsl:when>
                  <xsl:otherwise>
                    <div id="emergency">
                    <div id="emergencyClose">
                      <a onclick="document.getElementById('emergency').style.display='none';">
                        close <img src="/aacc-cms/general/images/icons/controls/close.png" />
                        </a>
                      </div>
                      <div id="emergencyHeader"><h1>AACC Alert</h1></div>
                      <xsl:apply-templates select="text/child::*[attribute::seq=12]" />
                      <br /><br />
                    </div>
                  </xsl:otherwise>
                </xsl:choose>
              <div class="home_rotator_img">
                    <xsl:call-template name="aacc_home_rotator" /><xsl:comment>rotator</xsl:comment>
              </div>
            </div>
      <div id="body_container_top_bg"><div id="body_container_bottom_bg"><div id="homepage_body_container">
            <div class="bottom_center_home">
              <div id="bottom_center_content">
                <xsl:if test="string-length(image/child::*[attribute::seq=1]/imgFile)>0" >
                  <div id="homepage_ad_1a">
                    <xsl:apply-templates select="image/child::*[attribute::seq=1]" />
                  </div>
                </xsl:if>
                <div id="homepage_ad_1b">
                  <xsl:comment>bottom ad</xsl:comment>
                  <a href="#"><xsl:apply-templates select="image/child::*[attribute::seq=2]" /></a>
                </div>
              </div>
            </div>
           <div id='e2campus' style="visibility:hidden;"> <script type="text/javascript" src="http://widgets.omnilert.net/f300fe3c5dccfdb6d076ecb0048934fa-1791">//</script> </div><!--E2campus smart code-->
            <div id="body_bottom_left_home">
              <div id="body_bottom_right_home">
                <h2>AACC Highlights </h2>
                <div class="highlights">
                  <div class="highlights_title">
                    <xsl:if test="string-length(text/child::*[attribute::seq=7])>0" >
                      <div id="tertiary_1_txt1" ><xsl:apply-templates select="text/child::*[attribute::seq=7]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>
                    </xsl:if>
                  </div>
                </div>
                <div class="highlights">
                  <div class="highlights_title">
                    <xsl:if test="string-length(text/child::*[attribute::seq=8])>0" >
                      <div id="tertiary_1_txt2" ><xsl:apply-templates select="text/child::*[attribute::seq=8]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>
                    </xsl:if>
                  </div>
                </div>
                <div class="highlights">
                  <div class="highlights_title">
                    <xsl:if test="string-length(text/child::*[attribute::seq=9])>0" >
                      <div id="tertiary_1_txt3" ><xsl:apply-templates select="text/child::*[attribute::seq=9]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>
                    </xsl:if>
                  </div>
                </div>
                <div class="highlights">
                  <div class="highlights_title">
                    <xsl:if test="string-length(text/child::*[attribute::seq=10])>0" >
                      <div id="tertiary_1_txt4" ><xsl:apply-templates select="text/child::*[attribute::seq=10]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>
                    </xsl:if>
                  </div>
                </div>
                <div class="highlights">
                  <div class="highlights_title">
                    <xsl:if test="string-length(text/child::*[attribute::seq=11])>0" >
                      <div id="tertiary_1_txt5" ><xsl:apply-templates select="text/child::*[attribute::seq=11]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>
                    </xsl:if>
                  </div>
                </div>
                <xsl:if test="string-length(image/child::*[attribute::seq=3]/imgFile)>0" >
                  <div class="highlights_last">
                    <div class="highlights_last_title">
                      <xsl:apply-templates select="image/child::*[attribute::seq=3]" />
                    </div>
                  </div>
                </xsl:if>
                <xsl:if test="string-length(image/child::*[attribute::seq=4]/imgFile)>0" >
                  <div class="highlights_last">
                    <div class="highlights_last_title">
                      <xsl:apply-templates select="image/child::*[attribute::seq=4]" />
                    </div>
                  </div>
                </xsl:if>
                <xsl:if test="string-length(image/child::*[attribute::seq=5]/imgFile)>0" >
                  <div class="highlights_last">
                    <div class="highlights_last_title">
                      <xsl:apply-templates select="image/child::*[attribute::seq=5]" />
                    </div>
                  </div>
                </xsl:if>
                <xsl:if test="string-length(image/child::*[attribute::seq=6]/imgFile)>0" >
                  <div class="highlights_last">
                    <div class="highlights_last_title">
                      <xsl:apply-templates select="image/child::*[attribute::seq=6]" />
                    </div>
                  </div>
                </xsl:if>
                <xsl:if test="string-length(image/child::*[attribute::seq=7]/imgFile)>0" >
                  <div class="highlights_last">
                    <div class="highlights_last_title">
                      <xsl:apply-templates select="image/child::*[attribute::seq=7]" />
                    </div>
                  </div>
                </xsl:if>
              </div>
              <div class="bottom_left_home">
                <h2 style="font-size:16px; font-weight:bold;"><a href="/newsroom" style="color:#ffffff;">AACC Newsroom</a></h2>
                <div id="home_news_content">
                  <!--<div class="homepage_news_item" style="color:#ff0000;">
                     <div class="homepage_news_headline">
                      <h3>Password Management Tool Unavailable 3/7-3/8</h3>
                    </div>
                    <div class="homepage_news_preview">
                      As part of the Friday scheduled system downtime which starts at 9:30 p.m., we will be upgrading the password management tool on March 7th. Due to the nature of this upgrade, we anticipate the password management tool to be unavailable until 3:30 p.m. on Sat., March 8th. During this time, you will not be able to reset your password. We will provide updates here on the AACC website and the portal.
                    </div>
                  </div> -->
                  <div id="news_articles" class="news_articles">
                  Loading newsroom feed...
                    <img src="/aacc-cms/general/image/cleardiv.png" />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </xsl:template>
    <xsl:template match="image/child::*[attribute::seq &lt; 3]" ><xsl:call-template name="genImg" /><br /></xsl:template>
    <xsl:template match="image/child::*[attribute::seq &gt; 2]" ><xsl:call-template name="genImg" /></xsl:template>
    </xsl:stylesheet>

  • Compile Error in Enhanced For Loop

    I'm learning generic collections and for practice wrote a simple class that uses a HashMap to store data. However, I'm getting a compile error for the code that accesses the HashMap. The error and code for my class follow.
    Can anyone help?
    Thanks...
    =====================
    The compile error:
    =====================
    MapDict.java:37: package Map does not exist for( Map.Entry entry : glossary.entrySet()  )                        ^1 error=======================
    The code for my class:
    =======================
    import java.util.Scanner;
    import java.util.HashMap;
    public class MapDict
         HashMap<String, String> glossary = new HashMap<String, String>();
         public void getEntries()
              Scanner sc = new Scanner( System.in ).useDelimiter("\n");
              String moreEntries = "y";
              String word        = "";
              String definition  = "";
              while ( moreEntries.toUpperCase().equals( "Y") )
                   System.out.print("Enter word: ");
                   word = sc.next();
                   System.out.print("Enter definition: ");
                   definition = sc.next();
                   glossary.put( word, definition);
                   System.out.print("Another glossary item? (y/n) ");
                   moreEntries = sc.next();
         public void displayEntries()
              System.out.println( glossary.size() );
              // Here is where the compile error occurs:
              for( Map.Entry entry : glossary.entrySet()  )
                   System.out.println( "\nWord: " + entry.getKey() + " Definition: " + entry.getValue() );
    }

    import java.util.Scanner;
    import java.util.HashMap;I don't see java.util.Map or java.util.Map.Entry listed here....

  • Compilation error and method for inheritance

    1.I've tried to construct @create table for an entity.an error occurs which is:
    'Warning: Type Body created with compilation errors.'
    Why and how to solve it?
    2.as oracle 8 does not support inheritance,the other method would be through nested table.what else could it be?

    stop and start the siebel server will solve.
    Regards
    Ahmed

  • BUG: 10.1.3..36.73 Internal Compile Error with enhanced for loop/generics

    I get the following compiler error when using the Java 5 SE enhanced for loop with a generic collection.
    Code:
    public static void main(String[] args)
    List<Integer> l = new ArrayList<Integer>();
    l.add(new Integer(1));
    printCollection(l);
    private static void printCollection(Collection<?> c)
    for (Object e : c)
    System.out.println(e);
    Error on attempting to build:
    "Error: Internal compilation error, terminated with a fatal exception"
    And the following from ojcInternalError.log:
    java.lang.NullPointerException
         at oracle.ojc.compiler.EnhancedForStatement.resolveAndCheck(Statement.java:2204)
         at oracle.ojc.compiler.StatementList.resolveAndCheck(Statement.java:4476)
         at oracle.ojc.compiler.MethodSymbol.resolveMethod(Symbol.java:10822)
         at oracle.ojc.compiler.RawClassSymbol.resolveMethodBodies(Symbol.java:6648)
         at oracle.ojc.compiler.Parser.resolveMethodBodies(Parser.java:8316)
         at oracle.ojc.compiler.Parser.parse(Parser.java:7823)
         at oracle.ojc.compiler.Compiler.main_internal(Compiler.java:978)
         at oracle.ojc.compiler.Compiler.main(Compiler.java:745)
         at oracle.jdeveloper.compiler.Ojc.translate(Ojc.java:1486)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:515)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:715)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:893)

    Install the Service Update 1 patch for JDeveloper (using the help->check for updates), and let us know if this didn't solve the problem.

  • Compiler Error on Linux for jni.h, any solution?

    Hi all,
    i am using jni.h file provided by sun to compile my code on linux, but it gives me compile error. though it compiles properly on Windows and AIX.
    what could be the reason?
    jni.h:202: error: expected &apos;)&apos; before &apos;*&apos; token
    jni.h:204: error: expected &apos;;&apos; before &apos;jclass&apos;
    jni.h:1877: error: expected &apos;)&apos; before &apos;*&apos; token
    jni.h:1879: error: expected &apos;;&apos; before &apos;jint&apos;
    and many more !!!

    i am using jni.h file provided by sun to compile my code on linuxAre you sure about that? Check that it isn't the one provided with GNU CLASSPATH. If it is, delete GNU CLASSPATH altogether. It isn't Java, and the incompatibility of jni.h is one of many reasons why not.

  • Compile error on .class for an array.

    How do I write the code below correctly?
            final ArgumentCaptor<MessageToken[]> tokenArg = ArgumentCaptor.forClass(MessageToken[].class);

    How do I write the code below correctly?
    final ArgumentCaptor<MessageToken[]> tokenArg = ArgumentCaptor.forClass(MessageToken[].class);
    What is the exact compilation error?
    Note that since ArgumentCaptor is probably a custom class that only you or your team knows about, we will maybe not be able to help a lot, we will probably need that you give us the signature of its method forClass
    Note that the problem is not that the syntaxfor the array class MessageToken[].class is illegal in itself; the following compiles perfectly:
    public class TestClassLitteral {
        Class stringClass = String.class;
        Class stringArrayClass = String[].class;
    }

  • JAXB compiler error : Complex Type Definition Representation Error

    Hi,
    I have a problem when I try to generate Java classes for the XML Digital Signature schema along with the XAdES extension. Apparently, we got an XML validation issue when the XAdES schema is parsed.
    Here is the xjc tool ouput :
    [ERROR] src-ct.1: Complex Type Definition Representation Error for type 'IdentifierType'.  When complexContent is used, the base type must be a complexType.
      line 33 of XAdES.xsd
    [ERROR] src-ct.1: Complex Type Definition Representation Error for type 'EncapsulatedPKIDataType'.  When complexContent is used, the base type must be a complexType.
      line 57 of XAdES.xsdNow these are the schema lines from XAdES.xsd that cause the problem :
    <xsd:complexType name="IdentifierType">
      <xsd:complexContent>
        <xsd:extension base="xsd:anyURI">
          <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="EncapsulatedPKIDataType">
      <xsd:complexContent>
        <xsd:extension base="xsd:base64Binary">
          <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>The most disturbing thing is that those two schemas I used (e.g. xmldsig-core-schema.xsd and XAdES.xsd) come directly from the W3C, so they should be fully compliant to the XML schema spec, shouldn't they ?
    Moreover, I tried to validate these two schemas with XML Spy 4.3 and the problem occurs in slightly different way. In fact, the <xsd:complexContent> tags are replaced silently by XML Spy with <xsd:simpleContent> tags in order to validate the schema. So XML Spy seems to have a problem too with these complex type definitions. Besides, if I replace the <xsd:complexContent> tags the same way as XML Spy does, and if I run again the JAXB compiler, it works fine...
    Does anyone have any knowledge about this issue ? I'd like very much to hear about anyone who has experienced or better solved the same kind of issue.
    By the way, here is the version of JAXB that I use :
    xjc version "1.0.2-b15-fcs"
    JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build 1.0.2-b15-fcs)Any help appreciated.
    Thanks,
    Gregory

    <xsd:extension base="xsd:anyURI">
    <xsd:extension base="xsd:base64Binary">
    The base attribute of the xs:extension elements shoule refer to a complexType.
    For example,
    <xs:complexType name="complexTypeA">
    </xs:complexType>
    <xsd:complexType name="IdentifierType">
    <xsd:complexContent>
    <xsd:extension base="complexTypeA">
    <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>

  • Compilation error in java for struts application.

    Hello,
    I'm a newbie in java and struts, i was trying a simple struts application given in "struts complete reference".This is my code of its Controller class(Action class):-
    package com.jamesholmes.struts;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    //Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if(name != null && name.trim().length() > 0)
    results = service.searchByName(name);
    else
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    //place search results in SearchForm for access by jsp.
    searchForm.setResults(results);
    //Forward control to this Action's input page.
    return mapping.getInputForward();
    Now problem is when i'm compiling this java file i'm getting error"can not resolve symbol" for the instances i'm creating for SearchForm(view class) and EmployeeSearchService(model class).can any one help me how to resolve this error. I've tried importing those classes explicitly also, but error gets increased this way.

    Tht problem is solved, it was a mistake frm my side in compilation precedure.Anyway, now the real error-After i compiled and created the war file of application, i was running it in tomcat and got this Error, it is i guess a server sprcific error which i am unable to understand., can any one now help me solving this out?????Error is this :-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521)
         org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436)
         org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:495)
         org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)
         org.apache.jsp.index_jsp._jspx_meth_html_link_0(index_jsp.java:96)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.
    Apache Tomcat/5.0.27

Maybe you are looking for

  • Opening attachments on my new macbook!! please help

    Hi, I have only recently bought a new white mac book! So far, so good! however, I have one slight problem - I am still using my hotmail account and because i am at university I receive a lot of email about coursework etc. Friends in my group have ema

  • Text Format in Mail Templates

    Hi Experts, I have a requirement , wherein I need to make certain word in my custom mail template( palin text) as bold or underline( or both) , I tried Mail template Macros FORMAT for this but it didnt work , If anyone knows how can we achieve this p

  • USB Flash disk bug on Solaris 10

    When I am trying to write more than 10 Mb data to USB disk on Solaris 10 writting process fails and everything hangs up until I switch off flash disk.Does anyone know solution to this problem?Thanks!

  • Simple submit of web document

    When I try to submit a web document in the Knowledge directory, if the site I'm submitting requires authentication or re-directs the document upload fails. Is this by design or should I be able to do this?

  • Change host of our R3 system

    Hi; When connect from portal to R3 system, the portal open the browser (ITS) with the hostname of the R3 system, not, full name (DNS), and we have error. How I can change the definition of name of the host to the full name ,for the portal open the co