Problems linking using custom Meaty Skeleton-like project

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
davidgm94
Posts: 1
Joined: Sun Sep 20, 2020 1:39 pm

Problems linking using custom Meaty Skeleton-like project

Post by davidgm94 »

Good evening everybody,

I am new to the forum, let me present myself:
I am a experienced C developer who recently got interested in osdev and for a few months I have been reading you (both forum and wiki) and been playing around with kernel code for the same amount of time.

I write to you now because I have been having troubles setting up my own project (well, more or less the beginning of it). The skeleton code which I am parting from is almost everything from the Meaty Skeleton project from this wiki and this wonderful tutorial https://github.com/cfenollosa/os-tutorial

My problem lies in a kernel linking error (undefined reference to printf) in kernel_main, which didn't happen to me with Meaty Skeleton. I have been searching for quite a while and I can't find the answer. Could you give me a hand please?

Thank you in advance :)

PD: Project repo: https://github.com/davidgm94/kmain
Cross-compiler: https://github.com/davidgm94/kmain/rele ... oss.tar.gz
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Problems linking using custom Meaty Skeleton-like projec

Post by PeterX »

I'm not good at reading other people's source code. So I may be wrong. But it seems to me that the libc makefile doesn't build stdio.o.

And are you sure you want to envoke printf() from within the kernel anyway?

Greetings
Peter
Post Reply