[AD] Getting Allegro to build with BCC32

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


Hi,

I spent some time tonight trying to make Allegro build with BCC32. I had
partial success. I made a few modifications to some of the source files in
src/win - the attached patch contains these (tested with BCC32 5.5 and
MingW32). I also had to add:

#define _getdrive()   getdisk()

to include/allegro/platform/albcc32.h (and uncomment the "Currently BCC32
cannot build the library" bit, obviously).

I've discovered that you have to build wddaccel.c, wddmode.c, wddovl.c,
wddlock.c, wddwin.c and wwnd.c as C++ files, mainly due to DirectX headers
and Borland C++ not liking various things in them (eg, unions). Really, the
only problem after this is assembly code, by the look of it. Here are the
linker results:

C:\Borland\allegro\obj\bcc32\alleg>ilink32 @file.txt
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '__blender_trans24' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\COLBLEND.OBJ
Error: Unresolved external '_errno' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WFILE.OBJ
Error: Unresolved external '_bmp_read_line' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\CGFX8.OBJ
Error: Unresolved external '_bmp_write_line' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\CGFX8.OBJ
Error: Unresolved external '_bmp_unwrite_line' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\CGFX8.OBJ
Error: Unresolved external '__handle_pckey' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WKEYBD.OBJ
Error: Unresolved external '__pckey_scancode_to_ascii' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WKEYBD.OBJ
Error: Unresolved external '_c_dfDIJoystick' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WJOYDX.OBJ
Error: Unresolved external '__pckeys_init' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WKEYBD.OBJ
Error: Unresolved external '_gfx_directx_write_bank' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDBMP.OBJ
Error: Unresolved external '_gfx_directx_unwrite_bank' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDRAW.OBJ
Error: Unresolved external '__set_colorconv_palette' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '__get_colorconv_blitter' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '__get_colorconv_map' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '_gfx_directx_unlock_win' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '_gfx_directx_unwrite_bank_win' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '_gfx_directx_write_bank_win' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '__release_colorconv_blitter' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WDDWIN.OBJ
Error: Unresolved external '_gfx_gdi_write_bank' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WGDI.OBJ
Error: Unresolved external '_gfx_gdi_unwrite_bank' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\WGDI.OBJ
Error: Unresolved external '_fixsqrt' referenced from
C:\BORLAND\ALLEGRO\OBJ\BCC32\ALLEG\MATH3D.OBJ
Warning: Attempt to export non-public symbol '__linear_vtable15'
Warning: Attempt to export non-public symbol '__linear_vtable16'
[snip every other exported function - I think I need to check some of the
headers]
Warning: Attempt to export non-public symbol 'font_vtable_color'
Warning: Attempt to export non-public symbol 'font_vtable_mono'

Any ideas what can be done about this?

Owen Rudge
http://www.owenrudge.co.uk/

MSN Messenger: owen@xxxxxxxxxx
ICQ: 125455765

Attachment: patch.diff
Description: Binary data



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