Welcome! Log In Create A New Profile

Advanced

dynamic libraries

Posted by arasium 
dynamic libraries
June 30, 2009 02:11PM
A simple question. Is it possible to create shared libraries on wii? If your answer is yes, how can i do?

Thank you



Edited 1 time(s). Last edit at 07/01/2009 01:32PM by arasium.
Re: Shared libraries
June 30, 2009 03:50PM
What do you mean by "shared libraries"? Up until now, I've only been aware of static and dynamic link libraries.
Re: Shared libraries
June 30, 2009 04:31PM
based on his previous posts, I conclude he is not a native english speaker, or he is 10 years old. Seeing as a 10yo can't program, he probably doesn't speak english.

I think if you look at "shared" library, the closest thing would be a DLL... I think... or maybe he wants to know how to "share" a library...

anyone else wanna try and interpret him?
Re: Shared libraries
June 30, 2009 04:50PM
Here is my interpretion...

He says shared because when you develop a library you share it on wiibrew, thus it becomes a shared library :)
Actually it's a static library... so it becomes a shared static library...

Yeah, really I interpretted this way at the first attempt

ps: dunno how to create a static library... you should possibly tweak the makefile and code accordingly...
Re: Shared libraries
June 30, 2009 05:07PM
How I would do it is just compile it, including the main.c. Then, copy all the .o for each .cpp file and each .h for each .cpp file, and zip them all together.

I dunno, I never really made a static library, I write all my own code and just copy the .cpp and .h generic files over between projects, so.... +shrugs+ it works. If I wanted to try a static library, the above is how I would go about trying to do it first. I never had to make a .dll before, so I don't even know how to go there @_@
Re: Shared libraries
June 30, 2009 08:29PM
Either you're talking about dynamically linked libraries, which I don't think are possible on the Wii currently since there is no OS running during homebrew and I don't think the Homebrew Channel or any other launcher has a dynamic linker built in (although it would be a neat surprise), or you just want to make your own statically linked library, which is definitely possible, but I think you knew that.
Re: Shared libraries
July 01, 2009 06:10AM
Since an application can control the whole memory, it would definitly be possible to load a executeable data and use it.

The Wii homebrew scene would only have to agree on a standard (sizes, calling conventions, file fomrat)
Re: Shared libraries
July 01, 2009 09:33AM
Quote
CloneDeath
based on his previous posts, I conclude he is not a native english speaker, or he is 10 years old. Seeing as a 10yo can't program, he probably doesn't speak english.

I think if you look at "shared" library, the closest thing would be a DLL... I think... or maybe he wants to know how to "share" a library...

anyone else wanna try and interpret him?

Yes, i'm not an native english speaker :) And yes, i was speaking about DLL.

Quote
iofthestorm
Either you're talking about dynamically linked libraries, which I don't think are possible on the Wii currently since there is no OS running during homebrew and I don't think the Homebrew Channel or any other launcher has a dynamic linker built in (although it would be a neat surprise), or you just want to make your own statically linked library, which is definitely possible, but I think you knew that.

Ok, so it isn't possible actually. Thank you.
Re: Shared libraries
July 01, 2009 12:44PM
Well, if Nintendo can do it, why not us too?
Re: Shared libraries
July 01, 2009 02:36PM
Quote
henke37
Well, if Nintendo can do it, why not us too?
How do we know Nintendo can do it?
Re: dynamic libraries
July 01, 2009 02:37PM
Well, I don't think Nintendo does o.O Too small of a memory and not enough good games to make it feasible. If I were Nintendo, I would just give them some static libraries to work with. Now Sony on the other hand....

But, no, I am 99% sure DLL's don't work, and they might actually make your game more encumbersome to the user. The general rule is, try to include as few files as possible with your game, and try to make those files optional, so that if the user doesn't drag-and-drop them, the program will just generate them for you.

I mean this like save files and stuff. Don't rely on external maps, compile those with the source code, since they will never change (not while the game is being played*)
Re: dynamic libraries
July 02, 2009 01:33AM
Actually "shared" is correct, that's why on all unix systems the extension is .so instead of .dll (stands for Shared Object). Only n00b windows users call them DLLs (like saying "folder" instead of directory).
Re: dynamic libraries
July 02, 2009 01:40AM
Really, punto, you want to argue about this? -_-

Anyhow, SHARED libraries are NOT supported either, to make things clear.
Re: dynamic libraries
July 02, 2009 02:07AM
A little bird whispered in my ear that the wiki has a page about the REL format that Nintendo is using. It's just a stub, but it's accurate as far as I know.
Re: dynamic libraries
July 02, 2009 05:35AM
Quote
CloneDeath
Anyhow, SHARED libraries are NOT supported either, to make things clear.

Why not?
We would just have to agree on a standard for it.
Re: Shared libraries
July 02, 2009 09:42AM
Quote
punto
Actually "shared" is correct, that's why on all unix systems the extension is .so instead of .dll (stands for Shared Object). Only n00b windows users call them DLLs (like saying "folder" instead of directory).

Oooooh, when i've read some of the responses, i thought i were a silly man :) I'm not very familiar with unix system (but, i known what is a shared library) so i haven't respond anything.

Thank you punto, i'm not silly.


Quote
CloneDeath
Really, punto, you want to argue about this? -_-

wikipedia



Edited 2 time(s). Last edit at 07/02/2009 09:45AM by arasium.
Re: dynamic libraries
July 02, 2009 09:49PM
Nonono! I wasn't like "challenging" him to argue about it, I meant, did he really want to distract from the topic of answering his question and change the thread to what it should be called. I prefer "Dynamic" because it contrasts with "Static", but I will admit that "Shared" is a better discriptor since "Dynamic" libraries never change :P on the other hand, "Static" libraries are also occasionally shared (in a distributed in a kind of standard way, like libogc), so either argument has it's flaws.

Back to the topic:

I don't believe a shared library is really possible. I mean, we could make a bunch of apps, each being like an "external function" then run those as if they were like a DLL... or something... I have never had to work with DLLs so that might just be the basic premise of how one works, so +shrugs+ I do know you pack multiple functions into 1 DLL though (ie: user32.dll has just about everything I need :P) so...

I mean, it would make sense doing this, but at the same time I have no idea how to approach it because I have not done anything like it on the Wii before.
Re: dynamic libraries
July 03, 2009 12:20AM
It would have to be something that the launcher does when a program starts up, and the linker would have to be modified to put in placeholders instead of actual memory locations when linking a program. It's "doable" from a theoretical standpoint, but I think it would depend largely on the members of Team Twiizers, and they're busy enough as is.
Re: dynamic libraries
July 03, 2009 08:42AM
Quote
iofthestorm
It would have to be something that the launcher does when a program starts up, and the linker would have to be modified to put in placeholders instead of actual memory locations when linking a program.

We could also use a real dynamic approach and load library funtions at runtime.
Re: dynamic libraries
July 03, 2009 02:01PM
Quote
CloneDeath
Nonono! I wasn't like "challenging" him to argue about it, I meant, did he really want to distract from the topic of answering his question and change the thread to what it should be called.

Ok, so, excuse me :)

I've an other idea to simulate shared objects. We can create forwarders to elf homebrews. But, the elf format contains the symbols of the package. So, can we use these symbols to find then execute a function (not the main) of the elf package?

I know that the .elf is bigger than the .dol, but it can resolve my problem (actually, i've created an app and i wan't to use plugins instead of always recompiling).



Edited 1 time(s). Last edit at 07/03/2009 02:01PM by arasium.
Sorry, only registered users may post in this forum.

Click here to login