1

I'm currently trying to use the gumbo-parser library with TCC compiler on Windows.

https://github.com/google/gumbo-parser

There are no library files included so I tried to create them by myself.

I was able to compile the get_tile.c demo by referencing all the library .o files manually, however i want to create a singe library (.so/.a/.dll) file.

I tried to generate a .dll by using tcc -shared *.c but when I try to create a .def file by using tiny_impdef I get the following error:

tiny_impdef: could not get exported function names.

I also tried to create a .a file by using:

> tiny_libmaker attribute.o char_ref.o error.o parser.o string_buffer.o string_piece.o tag.o tokenizer.o utf8.o util.o vector.o

But when I try to reference it, it looks like it won't get recognized:

> tcc -Isrc -Lsrc examples\get_title.c
tcc: error: undefined symbol 'kGumboDefaultOptions'
tcc: error: undefined symbol 'gumbo_parse_with_options'
tcc: error: undefined symbol 'gumbo_destroy_output'

What am I doing wrong?

Daveman
  • 1,075
  • 9
  • 26
  • In last `tcc` invocation, you do not specify library: it should be something like: `tcc -Isrc examples\get_title.c -Lsrc -l` – Mathieu Dec 14 '18 at 15:08
  • Ok, this seems to work. However there was another problem with the tcc export syntax of dll functions but technically this is solved. – Daveman Dec 16 '18 at 18:30

0 Answers0