Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

implementing a library in C

Name: OP !iV773cCkC. 2012-01-08 19:59

so I'm running MinGW on Windows, and I want to mess around Xiph.Org's libao - a cross-platform audio output library

I'm very inexperienced, and my question is how do I actually make use of it? You can download it here http://xiph.org/downloads/ (it's small)

I see an install-sh file but I can't actually make use of that on Windows, can I?

I can put the header files, which are under include/ into C:\MinGW\Include, right? (but that doesn't even seem right because then how would I remove libraries I added later if I wanted to? it's not separated) but then where do I put the actual source files?

Name: Anonymous 2012-01-08 20:07

Name: Anonymous 2012-01-08 20:09

Name: Anonymous 2012-01-08 20:34

Install Arch

Name: Anonymous 2012-01-08 20:38

haha, windows trash! Do people still use that? You probably don't talk to girls

-young deezy

Name: OP !iV773cCkC. 2012-01-08 20:41

according to http://xiph.org/ao/doc/libao-api.html all the functions are declared in ao/ao.h, but I can't run the example code when I put include/ into the right include path for MinGW (which I found from http://www.mingw.org/wiki/IncludePathHOWTO), it doesn't compile, because the functions aren't defined.

So I've put headers ( include/ ) in where mingw is looking for them and it seems I would want to put the definitions ( src/ ) into C:\MinGW\lib but those are all object files, and the libao download has a bunch of source code files

Name: Anonymous 2012-01-08 20:42

Do you know what linking is?
Do you know what object files are?

Name: OP !iV773cCkC. 2012-01-08 20:46

>>7
yes

do I compile the source files into object files and put them in the appropriate path then have to link all of them when I'm compiling?

Name: Anonymous 2012-01-08 20:46

>>8
Why are you even asking?

Name: Anonymous 2012-01-08 20:47

>>7
excuse me sir, but you have not proven that you know what those are either. In the case that the original poster (or perhaps, another person reading the thread) is unaware of what linking is, or what object files are, it may be have been more helpful for you to post a link to a reputable source explaining these concepts in a detailed and accessible manner. If you would like to play games of who knows what better than who, and who can understand my jargon better than who, then I would kindly ask you to take this game back to /g/.

Name: OP !iV773cCkC. 2012-01-08 20:52

>>8
Are you saying that's right? If so, that just doesn't seem right, I mean I feel like those object files would just get lost in there first of all and I couldn't remove this library easily later if I wanted to, and I feel like I shouldn't be linking each different source file. Can you compile multiple source files into one object file?

Name: Anonymous 2012-01-08 20:56

>>11

you can link multiple object files into a single library. Each source file should be compiled to its corresponding object file, and then the relevant object files can be linked to form an executable binary, or a dynamic library, or a static library. What OS and compiler are you using?

Name: OP !iV773cCkC. 2012-01-08 21:01

>>12
GCC (MinGW) on Windows Vista

I'd really just be happy if someone could hold my hand through getting this to work and then I could probably figure it out

Name: Anonymous 2012-01-08 21:02

Install MingW MSYS
http://www.mythtv.org/wiki/MythTV_on_Windows#HOWTO
Compile libao
http://www.mythtv.org/wiki/MythTV_on_Windows#ogg_and_vorbis

Or alternatively, you can install a decent Linux or BSD OS.

Name: Anonymous 2012-01-08 21:03

>>13
Full instructions can be found at

http://www.nambla.org

Name: Anonymous 2012-01-08 21:10

>>10
Listen you fucking retard, I was going to help him if he knew, and never post again if he didn't. Whether I know what they are or not is completely irrelevant, you're a fucking moron if you believe that has any relevance to OPs ability to use this library.

I asked those questions because I'm not going to help some retard who doesn't know what linking or object files are to use a library compiled from source, it would simply be too much effort, of course my assumption is that he answers truthfully, which he of course didn't judging by >>11.

Believe me when I say that I have absolutely no interest in telling OP that I know something he doesn't, the questions I asked was vital to OPs ability to use this library. The fact that you actually believed that someone would do that indicates that you're coming from a childish environment such as the imageboards, in which case I must ask you to fuck off right back to them.

Name: OP !iV773cCkC. 2012-01-08 21:19

>>14
alright, I'll be trying that.

>>16
what about that post makes you think I don't know what they are? :|

Name: Anonymous 2012-01-08 21:27

Name: Anonymous 2012-01-08 21:37

>>16

they do it all day long at /g/. I assumed that's what you were doing, based upon how your post was written, and from seeing a lot of such posts in my time.

Name: Anonymous 2012-01-08 21:43

>>19
This is not /g/. We do not HELP THEM!!!

Name: Anonymous 2012-01-08 22:04

>>17

not that dude, but you were trying to resolve an issue using only methods and constructs that you are currently aware of. If one was not aware of libraries, they would probably try to combine source files into a single object file. But there are reasons to avoid doing this. One reason, is that it wouldn't scale well. What if you had to compiles thousands of source files into the single object file? It would take forever to make a single change. By combining object files into libraries, only a few object files need to be recompile, and then they can all be linked together using a more efficient process. There's nothing wrong with thinking about this though. It is interesting to explore different methods for solving a problem. But this problem is already solved and all you have to do is read up on what other people do.

>>20
but...but.../g/ doesn't help them either...WHO WILL HELP THEM??

Name: Anonymous 2012-01-08 22:29

>>21
Stack overflow.

Name: Anonymous 2012-01-08 22:50

>>22
but..but..stackoverflow uses cheap jokes...and emoticons...and..and..it's horrible..I can't go back.

Name: Anonymous 2012-01-08 23:04

>>23
I'm sorry, but you must.

Name: Anonymous 2012-01-08 23:10

So you'll be an Austrian Nobleman

Implementing a library in C~~

Which defies all Earthly descriptions

You'll be implementing a library in C

Name: Anonymous 2012-01-08 23:16

OP, do you have something like Code::Blocks?

Name: Anonymous 2012-01-09 2:20

>>1
>MinGW
>on Windows
oh thank god

Don't change these.
Name: Email:
Entire Thread Thread List