setting up allegro with VC6.0
IOI-RLZ

Hi,
I just started with allegro and I am not able to run it,

I downloaded the files from here "http://www.allegro.cc/files/"

This is what I did
#1 Downloaded source for windows
#2 Downloaded the binaries (both allegro and allegroGL )

then i copied all the lib and include files into the lib and include folder of my VC6.0

#3 then I set the directories in VC6.0 as follows
include >> ALL421\ALLEGRO\INCLUDE
lib >> ALL421\ALLEGRO\LIB\MSVC

#4 now when I compile a program it says pc.h not found .

#5 I read another thread in this forum itself of another person with the same problem and it seems there was some conflict as follows >> "DJGPP instead of the MSVC ", but as far as I am concerned I think I have used the msvc version only!
???
Thanku

Saros69

This probably will not help directly

IOI-RLZ said:

then i copied all the lib and include files into the lib and include folder of my VC6.0

#3 then I set the directories in VC6.0 as follows
include >> ALL421\ALLEGRO\INCLUDE
lib >> ALL421\ALLEGRO\LIB\MSVC

Why do you still need to set directories if you have already copied the files over?

IOI-RLZ said:

This is what I did
#1 Downloaded source for windows
#2 Downloaded the binaries (both allegro and allegroGL )

If you have the binaries you don't need the source, but maybe you're keeping them for future use, so I dunno.

IOI-RLZ said:

#4 now when I compile a program it says pc.h not found .

Whoa, pc.h? Isn't that only used for the DJGPP version of Allegro? Something wonky's going on with your compile (hang on, are you compiling or using pre-compiled libraries? ???)

I suggest you either stick with the precompiled libraries only, or compile from the source only, but don't try to do both at the same time.

IOI-RLZ

ok thanks a lot! that got me thinking and well I corrected the mistakes ( I just used the binaries as I didn't have DJGPP installed, but now if I try to compile the code this is what i get ( I am using VC6.0 by the way !)

Quote:

Compiling...
main.cpp
Linking...
main.obj : error LNK2001: unresolved external symbol __imp__allegro_exit
main.obj : error LNK2001: unresolved external symbol __imp__key
main.obj : error LNK2001: unresolved external symbol __imp__textprintf_ex
main.obj : error LNK2001: unresolved external symbol __imp__screen
main.obj : error LNK2001: unresolved external symbol __imp__font
main.obj : error LNK2001: unresolved external symbol __imp__makecol
main.obj : error LNK2001: unresolved external symbol __imp__install_keyboard
main.obj : error LNK2001: unresolved external symbol __imp__set_gfx_mode
main.obj : error LNK2001: unresolved external symbol __imp___install_allegro_version_check
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/tester.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.

tester.exe - 11 error(s), 0 warning(s)

Saros69

It looks like you might be missing some linker inputs.

In your Project -> Settings -> Link -> Input -> Object/library modules, are you including alleg.lib or alld.lib?

alleg.lib for release version, alld.lib for debug version.

I could be wrong on the settings order as I'm using MSVC8 these days so just look around in your project settings for the Linker -> Input option somewhere.

IOI-RLZ

Brilliant just brilliant, It worked thanks a gazillion !!!

Skax459

Will there be a difference for someone playing the game if you include alleg.lib instead of alld.lib?

Milan Mimica

The produced executable will be larger and slower if linked to alld.lib.

GoldenPhoenix

How do you link files?

Meh, the first week of programming with VC++ is ridiculously complicated.

BAF

Wait, what is pc.h and why is the Windows version of Allegro for MSVC depending on it from DJGPP?

Is this supposed to happen?

gnolam

No. Methinks someone hasn't followed the build instructions. :P

Evert
Quote:

but as far as I am concerned I think I have used the msvc version only!

Strictly speaking, there is only one version of Allegro, that can be configured to compile on different compilers.

Quote:

why is the Windows version of Allegro for MSVC depending on it from DJGPP?

It doesn't, but by default the ZIP file download is still configured for DJGPP (which is why you need to run fix.bat). Thus, if you use the downloaded include files directly, you will get that warning.
And yes, people don't run into this problem if they bother reading the build instructions (or just install a binary version).

Thread #590048. Printed from Allegro.cc