Problem configuring a project to work with Allegro 4.2 using Visual Studio 7.1
kentl

Hi!

I'm trying to use the new version of Allegro with Microsoft Visual Studio 7.1. I have installed the binary file and am now trying to setup a project correctly using the information here.

When I come to setting up "Dynamically Linking" I have problems with step 2. I don't have any "Configuration Properties" / "C/C++" branch in my tree. ??? <Screenshot>

Hope that this is a common error, or perhaps my install of Visual Studio is broken. Either way, some enlightment would be highly appreciated!

Matthew Leverton

Have you added a C++ source file to your project yet?

kentl

Nope I hadn't, but it helped! Thank you! :)

I would suggest that it should be added to the instructions. If someone just follows them line by line as I did they will run into the same problem me.

[append - it still doesn't work!]
I thought it would work now that the C / C++ branch turned up, but no sir. When I continue to follow the instructions and get to trying to compile the little example it goes wrong. The example code is:

#include <allegro.h>

int main(void)
{
  allegro_init();
  allegro_message("Hello World");
  return 0;
}
END_OF_MAIN()

I get 2 errors and a lot of warnings, still I have followed the instructions as far as I can tell. My build log: BuildLog.htm

Matej Tyc

try to add
#pragma comment (lib, "alld.lib")

after #include <allegro>

Evert
Quote:

When I continue to follow the instructions and get to trying to compile the little example it goes wrong.

Do you have liballeg (or is that alleg.lib?) in the list of libraries to link with?

I'd advice against using pragma's. They're non-portable. I'd also advice using the normal alleg library instead of the debug alld library, though the latter can be useful to link with if you're having problems.

A J

1. dont use pragmas unless you really know why your using them.
2. your building a console app, you need to make a normal windowed app.
this is the cause of your errors. the others are just warnings.

Matthew Leverton

See step IA3.

Thread #543797. Printed from Allegro.cc