Skip to content

Linker error #1

@nfgallimore

Description

@nfgallimore

Hi, first off I want to thank you for creating the awesome tutorial. I'm having a bit of trouble compiling the code on Ubuntu installed via Windows 10 bash. I've tried changing the compilation part to use 32 bit flags and 64 bit flags but have had no luck so far (in both nasm -elf64 and gcc -m32) This is what happens using the version on master right now:

nfgallimore@DESKTOP-DA4I93N:~/micro$ make
/usr/bin/env ocamlc  -o micro unix.cma micro.ml
File "micro.ml", line 51, characters 53-69:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
nfgallimore@DESKTOP-DA4I93N:~/micro$ ./micro examples/hello.mc
compiling examples/hello.mc
/usr/bin/ld: i386 architecture of input file `examples/hello.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
nfgallimore@DESKTOP-DA4I93N:~/micro$

I'm sure this is something quite obvious. Thank you for the guide, it's very helpful because I want to use Ocaml for a compiler design course I am taking next semester.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions