Make issues

This is a discussion on Make issues within the C Programming forums, part of the General Programming Boards category; I get this error Code: [Build Error] No rule to make target 'EO.o' needed by Sample.exe. Stop I am using ...

  1. #1
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168

    Make issues

    I get this error
    Code:
    [Build Error] No rule to make target 'EO.o' needed by Sample.exe. Stop
    I am using newest version of bloodshed and i know it has to do with the make file.. however i dont know how to fix it

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    by newest do you mean 4.9.9.2 (which is a few years old anyways)? i have this version of dev-c++ too, but i dont really use the IDE, just the compiler it came with, which should be GCC if you chose that option.

    if you didnt edit any files you dont think you should have, then you shouldnt have any problem. i would recommend just starting a new project and add your .h/.c files to it manually and try it again. if theres still an error i dont know what the problem would be. at this point i would recommend to just use the command line when your actually compiling, or get a different IDE and use your current or different compiler.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by chico1st View Post
    I get this error
    Code:
    [Build Error] No rule to make target 'EO.o' needed by Sample.exe. Stop
    I am using newest version of bloodshed and i know it has to do with the make file.. however i dont know how to fix it
    It means that your makefile says that Sample.exe depends on EO.o, but there is no explicit or implicit rule that indicates how to produce a EO.o.

    Perhaps you are msising the EO.c file?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    well actually ... the I have EO.lib which is a library i didnt make but need.
    and I do have Sample.c and Sample.h

    I am using Dev C++ 4.9.9.2

    In Project->Project Options->Files
    I have checked the EO.lib -> Include In Linking
    If i dont check that, I get many other errors such as
    Code:
      [Linker error] undefined reference to `SuperFunction'
    Last edited by chico1st; 05-16-2008 at 06:16 AM.

  5. #5
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    Ok so since I am using this library maybe that is causing my problems.

    Here is an image of my project (im desperate and grasping at straws right now, I cant do anything if i cant compile my code)

    Actually I dont know how to post a picture.
    But included in my project are:
    Sample Project
    ---sample.c
    ---sample.h
    ---EO.lib
    ---Useful.h

    There is also the sample.dsp and sample.dsw, makefile.win, sample.layout files in the folder which I ahve not included in my project

    If I include the EO.lib file for compilation I get [build error] error 255
    Last edited by chico1st; 05-16-2008 at 09:54 AM.

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Don't compile the lib. Just link it.

  7. #7
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    if i just link it i still get the [Build Error] No rule to make target 'EO.o' needed by Sample.exe. Stop

    I am assuming there is something wrong with the library, I am going to go harass the person who made it.

  8. #8
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    As robwhit suggests, you should probably remove EO.lib from the project's included files. Then it will use EO.lib at the link stage.

  9. #9
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    how will i know to use EO.lib if I dont include it?

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by chico1st View Post
    how will i know to use EO.lib if I dont include it?
    A project will have two (or more) sets of files:
    Files that need compiling
    Files that you link with.

    The "files you link with" are usually specified in a "link" stage, rather than in the "what components to compile". Different IDE's do this slightly differently, but look for a "link" tab somewhere in your project settings and I suspect you will find a "additional libraries" or "additional components" part that you can fill in with that.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    what does it mean if I get this?

    Code:
      [Linker error] undefined reference to `func'
    But if i pass the wrong variable type to func the compiler detects this and tells me the prototype. It is obviously linked somehow. But why does it give undefined reference.

    I did what you said MATSP, but now my compiler will tell me prototypes but i get this.

  12. #12
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    That tells you that you are calling a func, which has no actual function declared.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  13. #13
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    you mean in the library there is no code for func?

    But it is properly linked with the library?

  14. #14
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by chico1st View Post
    you mean in the library there is no code for func?
    Yes.

    Edit: Or at least that's one possibility.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  15. #15
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168
    what are the other possibilities?
    the person who made this library will take me at least a day to get a hold of

    EDIT: and do i need to include a
    Code:
    int func((void **)Array);
    bit of code at the top?
    Last edited by chico1st; 05-21-2008 at 11:54 AM.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to make a Packet sniffer/filter?
    By shown in forum C++ Programming
    Replies: 2
    Last Post: 02-22-2009, 08:51 PM
  2. "Cannot make pipe"
    By crepincdotcom in forum C Programming
    Replies: 5
    Last Post: 08-16-2004, 12:43 PM
  3. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  4. make all rule
    By duffy in forum C Programming
    Replies: 9
    Last Post: 09-11-2003, 01:05 PM
  5. Replies: 6
    Last Post: 04-20-2002, 06:35 PM

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