Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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.

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

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Either at home or at work or down the pub
    It sounds like a coding standard that the newer compilers don't like. Have a look at this for an example
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    The Fifth Continent

  3. #3
    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

Posting Permissions

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