in reply to Re^6: inline c
in thread inline c

(quoting from the build log you linked to)

link -out:blib\arch\auto\xsmode\xsmode.dll -dll -nologo -nodef +aultlib -d ebug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 xsmode.ob +j C:\Per l\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.lib w +inspool.li b comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netap +i32.lib uu id.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.l +ib msvcrt. lib -def:xsmode.def link: invalid option -- o Try `link --help' for more information. NMAKE : fatal error U1077: 'link' : return code '0x1'

I can't help getting the impression that it's not the linker belonging to the compiler suite that's being called here, but rather some Windows port of the Unix command 'link'  - at least, if I type the respective command on my Debian box, I get a rather similarly looking output:

$ link -out:... link: invalid option -- o Try `link --help' for more information.

I wouldn't be too surprised, if you got

$ link --help Usage: link FILE1 FILE2 or: link OPTION Call the link function to create a link named FILE2 to an existing FIL +E1. --help display this help and exit --version output version information and exit Report bugs to <bug-coreutils@gnu.org>.

if you typed link --help  :)

In that case, make sure this command is no longer found along the search path, while trying to build stuff...   Just a thought.

Replies are listed 'Best First'.
Re^8: inline c
by panaman (Acolyte) on Apr 24, 2007 at 00:47 UTC

    By gosh by golly

    You are right on. I think that it was seeing the cygwin "link"
    I removed that from the path and now it sees the correct linker
    but it still fails with this error.

    C:\Program Files\Microsoft Visual Studio\VC98\lib\msvcrt.lib : fatal error LNK1113: invalid machine type
    NMAKE : fatal error U1077: 'link' : return code '0x459'

    I have posted the nmake test output it since it is so long at:
    http://volcanbaru.com/OSOP/monks/Monks2.txt
    I have also posted the belarc for the computer it was run on
    2.00 gigahertz AMD Mobile Sempron
    I would have thought that it was x86 but now I am not so sure
    I am going to reinstall everything on yet another computer
    and try it.

    I am open to any and all suggestions.

    angel

      OK, one step closer... towards the edge of the precipice :)

      As to your new problem, I'm not sure. It could be a broken C runtime library, msvcrt.lib (for whatever reason... — Can you successfully build and run a simple "Hello World" type C program?), or a 32-bit / 64-bit mismatch among some components of the whole shebang. However, the latter is unlikely, as I haven't seen any mention of "64" in this entire thread.  Other than that, I have no idea. The use of options (e.g. -MD) seems right, and I'm pretty sure an AMD Sempron is x86 compatible...

      Anyhow, I'd wager there are other monks with more Windows expertise than I have, so you might want to start a new thread, in case you don't get any other replies within a reasonable time frame...  you wouldn't want to have this buried in some deeply nested subthread that only you and me have been following until now :)   Good luck anyway!

        Hi,

        I was able to compile a small hello world code in C with no
        problems. I will take a step back and write up the problem again and
        start a new thread. I am not even sure where to start. I
        will play with this for a while and see what I can learn by myself.
        It just can't be this impossible.

        Thanks for your insights, they are valuable to me.


        Angel

      In the Console in which you are running your make commands, be sure to run

      "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.bat"

      to setup the appropriate environment variables.