Problem with Makefile

This is a discussion on Problem with Makefile within the C Programming forums, part of the General Programming Boards category; Dear all I am trying to run AES program which has been provided by an expert. I tried to follow ...

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    2

    Question Problem with Makefile

    Dear all


    I am trying to run AES program which has been provided by an expert. I tried to follow the dependencies but I end up with this error message

    Code:
    noura@noura-laptop:~/INT_PROJ/AESCODE/aes$ make
    gcc -c -Wall -ansi aescrypt.c
    gcc  -o aescrypt aescrypt.o 
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function `_start':
    (.text+0x18): undefined reference to `main'
    aescrypt.o: In function `aes_encrypt':
    aescrypt.c:(.text+0x1bd): undefined reference to `t_fn'
    aescrypt.c:(.text+0x1cd): undefined reference to `t_fn'
    aescrypt.c:(.text+0x1df): undefined reference to `t_fn'
    aescrypt.c:(.text+0x1f1): undefined reference to `t_fn'
    aescrypt.c:(.text+0x20d): undefined reference to `t_fn'
    aescrypt.o:aescrypt.c:(.text+0x21d): more undefined references to `t_fn' follow
    aescrypt.o: In function `aes_encrypt':
    aescrypt.c:(.text+0x1215): undefined reference to `t_fl'
    aescrypt.c:(.text+0x1225): undefined reference to `t_fl'
    aescrypt.c:(.text+0x1237): undefined reference to `t_fl'
    aescrypt.c:(.text+0x1249): undefined reference to `t_fl'
    aescrypt.c:(.text+0x1267): undefined reference to `t_fl'
    aescrypt.o:aescrypt.c:(.text+0x1277): more undefined references to `t_fl' follow
    aescrypt.o: In function `aes_decrypt':
    aescrypt.c:(.text+0x1604): undefined reference to `t_in'
    aescrypt.c:(.text+0x1614): undefined reference to `t_in'
    aescrypt.c:(.text+0x1626): undefined reference to `t_in'
    aescrypt.c:(.text+0x1638): undefined reference to `t_in'
    aescrypt.c:(.text+0x1656): undefined reference to `t_in'
    aescrypt.o:aescrypt.c:(.text+0x1666): more undefined references to `t_in' follow
    aescrypt.o: In function `aes_decrypt':
    aescrypt.c:(.text+0x2667): undefined reference to `t_il'
    aescrypt.c:(.text+0x2677): undefined reference to `t_il'
    aescrypt.c:(.text+0x2689): undefined reference to `t_il'
    aescrypt.c:(.text+0x269b): undefined reference to `t_il'
    aescrypt.c:(.text+0x26b7): undefined reference to `t_il'
    aescrypt.o:aescrypt.c:(.text+0x26c7): more undefined references to `t_il' follow
    collect2: ld returned 1 exit status
    make: *** [aescrypt] Error 1

    I have uploaded the files in the following link
    http://www.uploading.com/files/Y5X2YY7O/aes.zip.html

    the make file is uploaded with the files

    Please if any one knows what's the heck with my makefile reply me

    thanks and regards

  2. #2
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78
    I compiled successfully from command line with
    Code:
    gcc -c *.c
    gcc myshell.c
    gcc tablegen.c

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    2
    Thanks for the information. My problem comes when i try to create the executable file if you noticed.

    thanks

  4. #4
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78
    Two last commands compile files into executables, if you noticed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  2. problem with Makefile separator
    By luca in forum Tech Board
    Replies: 6
    Last Post: 01-15-2007, 09:20 AM
  3. Problem with makefile, how to use the -lm oh this?
    By Nazgulled in forum C Programming
    Replies: 1
    Last Post: 04-07-2006, 01:29 PM
  4. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  5. Replies: 5
    Last Post: 11-07-2005, 10:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21