Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Linking problem in C

Options
  • 17-06-2004 2:37pm
    #1
    Registered Users Posts: 2,191 ✭✭✭


    Ok just to give my position: I only did one year of C in college and that was 4 years ago, I've never used visual C++ before. The version Im using is 5.0 and the machine is using XP pro (don't see how it would affect it but hey). Now I've written a C program that didn't have any errors and which is to be used for and with 3rd party software (its a controller for a robot). I followed the instructions from the 3rd party software in setting up the includes and the lib files but keep getting the following error when I try to build:
    Linking...
    C:\Program Files\Webots\lib\Controller.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x40806242
    Error executing link.exe.
    
    MikesPioneer.exe - 1 error(s), 0 warning(s)
    

    Im probably missing some reference or path or something but I don't know what


Comments

  • Closed Accounts Posts: 3,322 ✭✭✭Repli


    Your disk is full ?


  • Registered Users Posts: 2,426 ✭✭✭ressem


    VC 5 is pretty old, and a lot of libraries might not link correctly/ haven't been tested with it.

    Possible solution: free download a new compiler like
    microsoft c++ compiler 2003 from
    http://msdn.microsoft.com/visualc/vctoolkit2003/
    and run the link command against that.

    Other options, corrupt library.

    Or there's another link.exe that your ide is finding in your path, not the one you want to use.

    and more.


  • Registered Users Posts: 2,191 ✭✭✭Unpossible


    Your disk is full ?
    nope

    ressem thanks for the link I downloaded it into my work machine, the website mentioned that if I have .NET 2003 that I don't need it so Im going to try and run the code on my home machine
    Other options, corrupt library

    Or there's another link.exe that your ide is finding in your path, not the one you want to use.
    .
    I don't think its a corrupt library as it won't work for other machines, although we did get it from the same disk, hmmmm
    and run the link command against that.
    As I said before I've never used this and was just following instructions, Im now trying to learn about this stuff, but Ive no idea what you mean (I just used the ide's interface to set everything). I was just building the thing, is that what you mean?
    Or there's another link.exe that your ide is finding in your path, not the one you want to use
    Im gonna have to check into this one, but I don't think its the problem


    This is probably really basic stuff and Im sorry for bothering you guys with it, like I said Im looking links up to try and learn more about it, if anyone knows a good site please post it

    thanks


  • Registered Users Posts: 2,426 ✭✭✭ressem


    Downloaded the webot evaluation V4 for windows.

    Have you tried building just the simple.c?
    Just to rule out different issues. This compiled and linked correctly using visual studio 2003.

    ---

    To Build and link with these tools, without the IDE
    type in all in one line at the command prompt.

    Replace with paths that suit your machine.

    "J:\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe" "D:\Program Files\Webots\controllers\simple\simple.c" "D:\Program Files\Webots\lib\Controller.lib" /I "D:\Program Files\Webots\include"

    cl will carry out the linking stage by default.
    mspdb71.dll has to be in your path (add it's folder to your path and log on again).
    And you should get a simple.exe generated in your current directory.

    /I specifies a directory that your compiler should search for include files. See MSDN cl.exe


  • Registered Users Posts: 2,191 ✭✭✭Unpossible


    Thanks dude, theres still something not quiet right but its probably a f**k up on my part.

    PS how do you find webots? Weve had a lot of teething problems with the thing


  • Advertisement
Advertisement