help with allegro - linking errors

This is a discussion on help with allegro - linking errors within the C++ Programming forums, part of the General Programming Boards category; hullo! first time posting.. hope this is in the right place. i'm having some trouble with allegro. i decided to ...

  1. #1
    Evil Sock Puppet MadHatter's Avatar
    Join Date
    Nov 2002
    Posts
    176

    Question help with allegro - linking errors

    hullo! first time posting.. hope this is in the right place.

    i'm having some trouble with allegro. i decided to give it a shot, but having problems getting it to work. i downloaded the thing for MSVC (i'm using MS visual C++ 6.0) from http://galileo.spaceports.com/~springs/ . i installed it, and went to http://www.allegro.cc/docs/windows-msvc-use.html (which i found in a readme file, i think) to test it out. as far as i know, the installation went fine.. i followed the instructions carefully, and i think i set up everything up right. it compiled fine, but when i ran it, i got this:

    --------------------Configuration: allegrotest - Win32 Debug--------------------
    Linking...
    LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library
    MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/allegrotest.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    allegrotest.exe - 2 error(s), 1 warning(s)

    i did the "statically linking" part on that page. here's the code i used..

    Code:
    #define ALLEGRO_STATICLINK
    #define USE_CONSOLE
    #include "allegro.h"
    
    int main(void)
    {
      allegro_init();
      allegro_message("Hello World");
      return 0;
    }
    END_OF_MAIN();
    anyone know what's wrong? i searched the forum and FAQ, but didn't find anything to solve the problem... help would be greatly appreciated.

  2. #2
    Evil Sock Puppet MadHatter's Avatar
    Join Date
    Nov 2002
    Posts
    176

    Talking

    thanks! that made it work.. i find it slightly odd, however, as the little tutorial didn't say it had to be a console application, and in fact had slight changes you had to make if you wanted it to be console, so it seems like it should work... oh well.

    i'm still getting a warning though

    LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library

    but it does work, and i even got the little allegro program in on FAQ board to work it showed my image, and exited when i pushed esc .. perhaps i'm over excited.. oh well

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 04:44 PM
  2. linking errors
    By sentienttoaster in forum C++ Programming
    Replies: 4
    Last Post: 11-30-2003, 02:01 PM
  3. Linking Errors
    By ForlornOdium in forum C++ Programming
    Replies: 2
    Last Post: 10-29-2003, 08:41 AM
  4. problem in allegro with sprite leaving trail
    By Leeman_s in forum C++ Programming
    Replies: 18
    Last Post: 09-13-2002, 03:04 PM
  5. double buffering for allegro
    By Leeman_s in forum C++ Programming
    Replies: 6
    Last Post: 09-12-2002, 02:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21