Skip to content
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

Symbol '__start' not found (was: I wasn't able to compile a simple hello world program) #17

Closed
rain-1 opened this issue Jul 4, 2017 · 2 comments
Labels

Comments

@rain-1
Copy link

rain-1 commented Jul 4, 2017

debbie@debian:~/SmallerC$ ./smlrcc -I./v0100/include/ ~/t/t.c

Symbol '__start' not found

Failed command 'smlrl -elf /home/debbie/t/t.o -o a.out'

hello, what did I do wrong?

@alexfru
Copy link
Owner

alexfru commented Jul 4, 2017

Smaller C Compiler Driver Wiki:

Location of system header and library files under Linux: smlrcc will first look for files limits.h and lc*.a under $SMLRC/include and $SMLRC/lib, where $SMLRC is the value of the environment variable SMLRC. If it doesn't find them there, it will next look for them under $HOME/smlrc/include and $HOME/smlrc/lib, where $HOME is the value of the environment variable HOME, IOW, the user's home directory. If it doesn't find them there, it will look for them under /usr/local/smlrc/include and /usr/local/smlrc/lib. If limits.h isn't found, smlrcc won't pass -SI<path_to_limits.h> to the core compiler, which will likely result in a compilation error, unless the proper -SI option is given to smlrcc. If the standard library isn't found and the -SL option isn't given to smlrcc, the standard library won't be linked in, potentially causing a linking error.

The easiest is to simply do:

./configure
make
sudo make install

This will compile Smaller C and put the binaries in /usr/local/bin and the headers and libraries under /usr/local/smlrc.

@rain-1
Copy link
Author

rain-1 commented Jul 4, 2017

thank you!

@rain-1 rain-1 closed this as completed Jul 4, 2017
@alexfru alexfru changed the title I wasn't able to compile a simple hello world program Symbol '__start' not found (was: I wasn't able to compile a simple hello world program) Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants