I'm working on a parser that parses json string and I want to make it a library. The problem is that when I use ld to link the library I wrote, there's a error message:
main.o: In function `main':
main.c:(.text+0x0): multiple definition of `main'
json-parser.o:/build/buildd/flex-2.5.35/libmain.c:29: first defined here
how can I fix this..? thanks.
If you want to delete flex-basis , you can use width or height instead. When specified on a flex item, the auto keyword retrieves the value of the main size property as the used flex-basis . And the main size property is given by width (in row layouts) or height (in column layouts):
You can make flex items take the content width instead of the width of the parent container with CSS properties. The problem is that a flex container's initial setting is align-items: stretch; meaning that items expand to cover the container's full length along the cross axis.
using gcc -o charcount charcount.o -lfl
instead of gcc -o charcount -lfl charcount.o
may be help.
It's strange that the order of object file and shared library make crucial sense here, but the reversion really works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With