Re: [AD] big big bug in allegro mignw32 static library (read this one)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Forget all this
I didn't know I had to #define ALLEGRO_STATICLINK (doh)
and abou the mmx, also my fault
sooooo, forget all this
sorry :)

----- Original Message -----
From: "Javier González" <xaviergonz@xxxxxxxxxx>
To: "Allegro Conductors" <conductors@xxxxxxxxxx>
Sent: Wednesday, February 07, 2001 7:59 PM
Subject: Re: [AD] big big bug in allegro mignw32 static library (read this
one)


> Geez, sorry about this mail
> but the problem persists (cannot compile cpp files with static link)
> (forget the patch)
>
> ----- Original Message -----
> From: "Javier González" <xaviergonz@xxxxxxxxxx>
> To: "Allegro Conductors" <conductors@xxxxxxxxxx>
> Sent: Wednesday, February 07, 2001 7:49 PM
> Subject: [AD] big big bug in allegro mignw32 static library (read this
one)
>
>
> > i dont know for other static libraries, but in migw32 one
> > it can compile c programs but NOT cpp programs (giving out lots of
> undefined
> > external references)
> >
> > maybe a extern "C" { missed out?
> >
> > for example, when i compile:
> > gcc -mwindows
> >
>
a.c -lalleg_s  -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddr
> > aw -ldxguid -lwinmm -ldsound
> > wonderful, compiles ok
> >
> > but when i change the file extension to cpp and do
> > gcc -mwindows
> >
>
a.cpp -lalleg_s  -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -ld
> > draw -ldxguid -lwinmm -ldsound
> >
> > i get
> > C:\WINDOWS\TEMP\cct7pyfb.o(.text$set_window_title+0xd):a.cpp: undefined
> > reference to `_imp__system_driver'
> > C:\WINDOWS\TEMP\cct7pyfb.o(.text$set_window_title+0x1e):a.cpp: undefined
> > reference to `_imp__system_driver'
> >
> > the error seems to be that AL_VAR instead of
> > #define AL_VAR(type, name)  extern type name
> > should be
> > #define AL_VAR(type, name) extern "C" type name
> >
> > so patch attached with the solution, tested under djgpp and mingw32
> >
> > also note that when trying to compile directly a static library without
> have
> > compiled a dll library first, i get one of those mmx.h errors
> >
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/