-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linker error #1
Comments
@nfgallimore sure, thank you for reading my blog, now first of all in ubuntu you need to be able to compile 32-bit applications with gcc, to do that you need to install gcc-multilib sudo apt-get install gcc-multilib then in micro.ml on line 320 add -m32 flag to gcc compile command like so Now recompile your micro compiler using make and try compiling example again, should work |
Thanks for the reply @troydm Here's what happened when I did that and tried to run the binary: nfgallimore@DESKTOP-DA4I93N:~/micro/examples$ ./hello I tried following these steps, and I had previously tried adding the -m32 flag. I tried compiling it into 64 bit using nasm -elf64 as well but the assembly operations are not supported. What system did you compile this on? |
@nfgallimore strange, should work, I've tried it on Ubuntu 16.04 LTS x86-64 |
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:
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.
The text was updated successfully, but these errors were encountered: