Thread: Help need compiling application

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    5

    Smile Help need compiling application

    Hello,

    I am trying to run the demo program patest_saw.c of portaudio (www.portaudio.com.

    I don´t have C experience (I am a java/php developer) and I don´t know about makefile, configure,dll, libs, ...

    I am using as IDE C-Free (don´t have fancy borland or visual c++ tools).

    I have lost several days trying to run the demo program.

    Can anyone please help me to run it?

    Thanks.

  2. #2
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    I've never heard of your IDE. Have you ever considered Dev-C++, which is also free, and which most people around these boards have more experience with ?
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    5
    Thanks.

    I will try to find that IDE.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    According to the IDE homepage - http://www.programarts.com/cfree_en/index.htm
    You also need to download a compiler.

    An IDE is just a pretty editor for your code, by itself it does NOT compile your code into an executable file.

    Now which compiler you choose depends a bit on that library you're interested in.
    Do they have any particular recommendations as to which to choose (like which have they tested it with for example).

    Seriously, diving into building complex libraries without even knowing some 'C' is a big ask IMO.
    Most people should start with the archetype "hello world" and get a bit of practice in.

    I'm assuming that at some point, after building the library you'll be wanting to write some more C to make use of it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Also look at Code::Blocks (although this doesn't come with a compiler).
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  6. #6
    Registered User
    Join Date
    Nov 2006
    Posts
    5
    Hello,

    I have downloaded Dev-C++ 4. My problem is still the same.

    The programs compile but then when linking comes trouble.

    I get errors like Undefined referece to: Pa_Sleep or to PaHostApiIinitializers, ...

    I donīt know what to do. I am sure that for someone with experience is a 5 min. problem. For me an amazing amount of days lost.

    Thanks.

  7. #7
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Post your code.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > The programs compile but then when linking comes trouble.
    When you downloaded the library, did you get something with a name ending in .lib ?
    Say libpa.a

    In the project settings, there is a place where you can specify additional libraries (and where to look for those libraries).
    So for example, you might need to add -lpa
    That's a minus, lowercase 'L' and the base name of the library. 'pa' would find libpa.a

    Don't forget to add where the library is, if it isn't where all your other libraries are.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  9. #9
    Registered User
    Join Date
    Nov 2006
    Posts
    5
    Thanks for answering.

    With portaudio there is no .lib file.

    Today i have also lost several hours with this. I canīt believe this is happening to me after so many years developing.

    I am desperate.

    Thanks.

  10. #10
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    Then your best bet is probably to find the library that Salem is talking about.
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Sounds like you're supposed to download all the source for portaudio, and then compile it locally yourself.

    Also, there is a message board / mailing list / FAQs on that site which you should be using.
    a) they have a lot more information
    b) they have a lot more people who know all the details
    c) they'll be more interested (or motivated) in getting you to where you want to be.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #12
    Registered User
    Join Date
    Nov 2006
    Posts
    5
    thanks for your answer.

    I have tried finding help in that list.

    Unfortunately i didnīt get it.

    Ed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  4. compiling and executing issue with lcc win32
    By GanglyLamb in forum C Programming
    Replies: 10
    Last Post: 12-22-2004, 02:24 PM