Results 1 to 5 of 5

Thread: Need help on OpenAL

  1. #1
    Member Newbie
    Join Date
    Aug 2009
    Location
    Iran, Mashhad
    Posts
    41

    Need help on OpenAL

    HI people

    I know I should not ask this here but I couldn't find appropriate place to ask it.

    I am trying to use OpenAL in a super simple hello world sample thing for the first time and but I get an error for almost each line !

    I included many OpenAL headers, copied these files almost everywhere in my Hard Disk:
    openal32.dll
    alut.dll
    alut.lib

    but still no action!

    here is the code:
    Code :
    #include <stdlib.h>
    #include <AL\alut.h>
    #include <AL\alc.h>
    #include <AL\al.h>
     
    int main (int argc, char *argv[])
    {
      ALuint helloBuffer, helloSource;
      alutInit (&amp;argc, argv);
      helloBuffer = alutCreateBufferHelloWorld ();
      alGenSources (1, &amp;helloSource);
      alSourcei (helloSource, AL_BUFFER, helloBuffer);
      alSourcePlay (helloSource);
      alutSleep (1);
      alutExit ();
      return EXIT_SUCCESS;
    }

    And I get these errors :
    Code :
    1>------ Build started: Project: AL, Configuration: Debug Win32 ------
    1>Compiling...
    1>hello_world.c
    1>Linking...
    1>hello_world.obj : error LNK2019: unresolved external symbol __imp__alutExit referenced in function _main
    1>hello_world.obj : error LNK2019: unresolved external symbol __imp__alutSleep referenced in function _main
    1>hello_world.obj : error LNK2019: unresolved external symbol _alSourcePlay referenced in function _main
    1>hello_world.obj : error LNK2019: unresolved external symbol _alSourcei referenced in function _main
    1>hello_world.obj : error LNK2019: unresolved external symbol _alGenSources referenced in function _main
    1>hello_world.obj : error LNK2019: unresolved external symbol __imp__alutCreateBufferHelloWorld referenced in function _main
    1>hello_world.obj : error LNK2019: unresolved external symbol __imp__alutInit referenced in function _main
    1>C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\AL\Debug\AL.exe : fatal error LNK1120: 7 unresolved externals
    1>Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\AL\AL\Debug\BuildLog.htm"
    1>AL - 8 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    P.S: I use microsoft visual c++ express edition 2008

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Need help on OpenAL

    do you define alut.lib to be used on the linking phase ?

  3. #3
    Member Newbie
    Join Date
    Aug 2009
    Location
    Iran, Mashhad
    Posts
    41

    Re: Need help on OpenAL

    tahnx ZbuffeR for your concern.

    Well ... I don't think I have done that so far
    How can I do that thing you said?

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Need help on OpenAL


  5. #5
    Member Newbie
    Join Date
    Aug 2009
    Location
    Iran, Mashhad
    Posts
    41

    Re: Need help on OpenAL

    thanx mate
    I figured it out

Similar Threads

  1. look at // openAL
    By mikethebike in forum OpenGL: General
    Replies: 4
    Last Post: 07-24-2010, 12:09 PM
  2. OpenAL
    By ajax in forum OpenSL ES
    Replies: 6
    Last Post: 08-05-2007, 01:41 PM
  3. SDL and OpenAL
    By Questions Burner in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-30-2002, 12:41 AM
  4. OpenAL
    By MrShoe in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-09-2001, 06:26 PM
  5. Anyone know about OpenAL....
    By tfpang in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-27-2001, 01:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean