Find the answer to your Linux question:
Results 1 to 3 of 3
Hello all. I wanted to say I apologize if this is in the wrong section of the forums, but I feel this is where it is most appropriate. I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    4

    Having trouble installing a C program onto Ubuntu 12.04


    Hello all.

    I wanted to say I apologize if this is in the wrong section of the forums, but I feel this is where it is most appropriate.

    I have installed a program called Simplescalar onto my Linux which uses a tool called Wattch. Wattch allows me to see the power consumed when executing a certain program, but with the Wattch tool there is a C program that I've been trying to compile, but it won't install. Here's what I get on the Terminal when I type in:

    make wattch-interact

    cc `./sysprobe -flags` -DDEBUG -O0 -g -Wall -c wattch-interact.c
    wattch-interact.c:69:1: warning: return type defaults to ‘int’ [-Wreturn-type]
    wattch-interact.c: In function ‘main’:
    wattch-interact.c:223:2: error: label at end of compound statement
    wattch-interact.c:75:7: warning: unused variable ‘scale_factor’ [-Wunused-variable]
    wattch-interact.c:73:100: warning: unused variable ‘regfile_bitline’ [-Wunused-variable]
    wattch-interact.c:73:80: warning: unused variable ‘regfile_wordline33’ [-Wunused-variable]
    wattch-interact.c:73:60: warning: unused variable ‘regfile_wordline16’ [-Wunused-variable]
    wattch-interact.c:73:42: warning: unused variable ‘regfile_wordline’ [-Wunused-variable]
    wattch-interact.c:73:25: warning: unused variable ‘regfile_decoder’ [-Wunused-variable]
    wattch-interact.c:73:10: warning: unused variable ‘regfile_power’ [-Wunused-variable]
    wattch-interact.c:228:1: warning: control reaches end of non-void function [-Wreturn-type]
    make: *** [wattch-interact.o] Error 1

    I'm not quite sure what most of this means, except for the unused variable part. If anyone could help me decipher this it would be of immense help and it may help me install it properly so I can use it.

    Thanks.
    Last edited by Redcomet; 06-10-2012 at 05:32 PM.

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,649
    It sounds like a coding standard that the newer compilers don't like. Have a look at this for an example
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    4
    Thank you for the help! It worked as soon as I added that one Semicolon. To think it was something so small. That's programming for you!

  4. $spacer_open
    $spacer_close

Posting Permissions

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