Hi Charles and list-

I thought I could get the compiling and linking easier. I tried what
Charles said but there is something I am missing.

I ran agar-config --cflags and got:

agar-config --cflags
-I/usr/local/include/agar   -I/usr/include/freetype2
-I/usr/include/libpng16        -I/usr/include/libpng16

agar-config --libs

agar-config --libs
-L/usr/local/lib -lag_gui -lag_core  -lfreetype   -L/usr/local/lib
-lopengl32 -lgdi32    -lm  -L/usr/lib -lpng16 -lpthread     -lwinmm

So I tried these 2 compiling and linking sections. I tried specifying the
include files in the binary download with my -I and libs in binary download
with my -L.

If you know of any cool tricks... please let me know if I am close or way
off.

thanks.

x86_64-w64-mingw32-gcc.exe -c hello.c  \
    -I/usr/include/freetype2 -I/usr/include/libpng16  \
    -I/usr/include/libpng16
-I/cygdrive/c/agar-1.5.0-mingw32-x86_64/include/agar

x86_64-w64-mingw32-gcc.exe hello.o -o foo.exe \
  -L/cygdrive/c/agar-1.5.0-mingw32-x86_64/lib \
 -L/cygdrive/c/windows/system32    \
  -lag_gui -lag_core  -lfreetype    -lopengl32 \
  -lm -lgdi32 -L/usr/lib  -lpng16  -lpthread    -lwinmm

I ended up with the error below.

d000027.o:(.idata$5+0x0): multiple definition of
`__imp___C_specific_handler'
d000024.o:(.idata$5+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
`pre_c_init':
/usr/src/debug/mingw64-x86_64-runtime-6.0.0-1/crt/crtexe.c:146: undefined
reference to `__p__fmode'
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
`__tmainCRTStartup':
/usr/src/debug/mingw64-x86_64-runtime-6.0.0-1/crt/crtexe.c:290: undefined
reference to `_set_invalid_parameter_handler'
/usr/src/debug/mingw64-x86_64-runtime-6.0.0-1/crt/crtexe.c:299: undefined
reference to `__p__acmdln'
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-merr.o):
In function `_matherr':
/usr/src/debug/mingw64-x86_64-runtime-6.0.0-1/crt/merr.c:72: undefined
reference to `__acrt_iob_func'
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):
In function `__report_error':
/usr/src/debug/mingw64-x86_64-runtime-6.0.0-1/crt/pseudo-reloc.c:149:
undefined reference to `__acrt_iob_func'
/usr/src/debug/mingw64-x86_64-runtime-6.0.0-1/crt/pseudo-reloc.c:150:
undefined reference to `__acrt_iob_func'
collect2: error: ld returned 1 exit status
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to