Current GhostBSD, all packages up to date.
Unless I am missing something pretty basic, I cannot compile a "Hello World" c program.
There is a man entry for clang, but no clang.
There is a clang80, but the man page for clang80 says to call clang.
When I use clang80 it can't find <stdio.h>
If I search / for stdio.h, there doesn't appear to be a stdio.h related to clang or llvm80.
I loaded gcc48 and gcc9. Same problem finding <stdio.h>.
But there are include files containing stdio.h for both.
But they are not in a directory that the compilers searches (-v option show search path).
If I copy stdio.h to a directory that gcc48 will search, then I get:
/usr/local/bin/ld: cannot find /usr/lib/libc_nonshared.a
/usr/local/bin/ld: cannot find /usr/lib/libssp_nonshared.a
If I search / for libc_nonshared.a, nothing is found.
To say the least, I am very unimpressed!
C compiler problems
Re: C compiler problems
You need to install os-generic-userland-devtools
Re: C compiler problems
Eric thanks for your reply
Re: C compiler problems
Does it works? I'm sorry there's no pkg name os-generic-userland-devtools
Re: C compiler problems
Yes, it is Unless you are not on the GhostBSD 19.09 or newer.
Code: Select all
pkg search os-generic-userland-devtools
os-generic-userland-devtools-12.1.20190924111836 FreeBSD userland compilers and libraries
Re: C compiler problems
Thanks, Eric. I am a newcomer about BSD system. I am very appreciate GhostBSD .
and I have edited/translated GhostBSD wiki into chinese language.
Sorry for my ugly English, can you add a topic about CJKV(Chinese/Japanese/Korean/Vietnamese) in this forum, like french and germany. I can write a little Chinese article to introduce GhostBSD.
and I have edited/translated GhostBSD wiki into chinese language.
Sorry for my ugly English, can you add a topic about CJKV(Chinese/Japanese/Korean/Vietnamese) in this forum, like french and germany. I can write a little Chinese article to introduce GhostBSD.
Re: C compiler problems
Yeah, I will try to find time for that and if do not do it in the next week you can PM to remind me, I tend to forget a lot of things.
Re: C compiler problems
It has changed lately. See https://ghostbsd-documentation-portal.r ... n-ghostbsd, and you now have to do sudo pkg install -g 'GhostBSD*-dev'