Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Problem configuring a project to work with Allegro 4.2 using Visual Studio 7.1

Credits go to Matthew Leverton for helping out!
This thread is locked; no one can reply to it. rss feed Print
Problem configuring a project to work with Allegro 4.2 using Visual Studio 7.1
kentl
Member #2,905
November 2002

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
Supreme Loser
January 1999
avatar

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

kentl
Member #2,905
November 2002

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
Member #6,575
November 2005

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

after #include <allegro>

Evert
Member #794
November 2000
avatar

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
Member #3,025
December 2002
avatar

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.

___________________________
The more you talk, the more AJ is right. - ML

Matthew Leverton
Supreme Loser
January 1999
avatar

Go to: