Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to compile c99-to-c89 convertor with clang?
    primarykey
    data
    text
    <p>I'm trying to compile ffmpeg in windows for VisualStudio and one of the step is to compile <a href="https://github.com/rbultje/c99-to-c89" rel="nofollow">c99-to-c89</a> code with clang according to <a href="http://blogs.gnome.org/rbultje/2012/09/27/microsoft-visual-studio-support-in-ffmpeg-and-libav/" rel="nofollow">this</a> post. I managed to create clang.exe but how I compile c99-to-c89 code with it?</p> <p>I changed a little bit the makefile in c99-to-c89 so <code>CC</code> variable points now to clang.exe compiler and not cl.exe</p> <pre><code>EXT=.exe all: c99conv$(EXT) c99wrap$(EXT) CLANGDIR=C:/build CC=C:/build/bin/Release/clang.exe CFLAGS=-nologo -Z7 -D_CRT_SECURE_NO_WARNINGS=1 -Dpopen=_popen -Dunlink=_unlink -Dstrdup=_strdup -Dsnprintf=_snprintf -I. -I$(CLANGDIR)/tools/clang/include LDFLAGS=-nologo -Z7 $(CLANGDIR)/lib/Release/libclang.lib clean: rm -f c99conv$(EXT) c99wrap$(EXT) convert.o compilewrap.o rm -f unit.c.c unit2.c.c test1: c99conv$(EXT) $(CC) -P unit.c -Fiunit.prev.c ./c99conv unit.prev.c unit.post.c diff -u unit.{prev,post}.c test2: c99conv$(EXT) $(CC) -P unit2.c -Fiunit2.prev.c ./c99conv unit2.prev.c unit2.post.c diff -u unit2.{prev,post}.c test3: c99conv$(EXT) $(CC) $(CFLAGS) -P -Ficonvert.prev.c convert.c ./c99conv convert.prev.c convert.post.c diff -u convert.{prev,post}.c c99conv$(EXT): convert.o $(CC) -Fe$@ $&lt; $(LDFLAGS) $(LIBS) c99wrap$(EXT): compilewrap.o $(CC) -Fe$@ $&lt; $(LDFLAGS) %.o: %.c $(CC) $(CFLAGS) -Fo$@ -c $&lt; </code></pre> <p>but when I run <code>make</code> command I get <code>clang: error: unsupported use of internal gcc -Z option '-Z7'</code>. I guess the problem in <code>CFLAGS</code> and <code>LDFLAGS</code> but I don't know how to fix it because the lack of knowledge in makefile and clang.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload