|
This thread is locked; no one can reply to it. |
1
2
|
AMGC2 Loader |
miran
Member #2,407
June 2002
|
Still the same. If you print out the value dlerror() returns like Thomas said, it can help a bit. I added that in my copy and here's what it reports after failing to load the .so: ./amgc2load: undefined symbol: GetPlugin Which is weird. But it gets even more weird if I compile your program manually with g++ -o amgc2load main.cpp -I../src/ -ldl `allegro-config --libs`: �@: cannot open shared object file: No such file or directory Only if I compile with -O2, I get the first error. So maybe it's something about the way it's compiled. Maybe something doesn't get linked in properly? -- |
juvinious
Member #5,145
October 2004
|
Hmm maybe it's a name conflict. I didn't realize that the export "C" is GetPlugin for the loader and I'm using that as well. __________________________________________ |
miran
Member #2,407
June 2002
|
Makes no difference. -- |
juvinious
Member #5,145
October 2004
|
__________________________________________ |
miran
Member #2,407
June 2002
|
Quote: There is no hope.
Quote: Missing libraries? What could be missing? Quote: What distro? FC5_x64, but what could that have to do with anything? My code works when I use it, but not when you use it... EDIT: I made a little test program which works like your loader. It includes IGame.h and plugin.h from the AMGC2 source dir and uses them to load a plugin specified with the command line and prints out plugin info i n an Allegro window. Analyze it and see what you're doing differently, because this program works just fine for me.
And here's the makefile too. I use the same makefile to compile your loader as well. (note: I keep the source code in a directory under the AMGC2 dir) CFLAGS = -s -O2 -W -Wall -I../src/ LIBS = \ -ldl\ `allegro-config --libs` all: main.cpp g++ -o ../testload main.cpp $(CFLAGS) $(LIBS)
-- |
juvinious
Member #5,145
October 2004
|
I do exactly the same thing except for two things: __________________________________________ |
Thomas Fjellstrom
Member #476
June 2000
|
I downloaded the loader thing yesterday sometime, and it works fine here. I repeat, IT WORKS HERE. These are the steps I followed: -- |
miran
Member #2,407
June 2002
|
Quote: I install the keyboard before set_color_depth(32) and I don't use -ldl in my build flags. It doesn't matter, the same happens if I build with your cbuild script or my makefile. Quote:
Did you try getting info for a plugin through the command line? No difference. The error occurs when loading the .so. Thomas: Yes, that's how it's supposed to be. But for some reason this doesn't work for me in Linux (it works in Windows though)... -- |
Audric
Member #907
January 2001
|
Time to check the linker version ? $ gcc -v amgc2 loader is useful, by the way, since amgc2 spends a noticeable time scanning the directories for all games (listing them in text mode, white text on black background, was a bit too much, I think) So the loader is valuable for quicker testing during development. Can even run it from the makefile |
miran
Member #2,407
June 2002
|
Quote: amgc2 loader is useful, by the way, since amgc2 spends a noticeable time scanning the directories for all games (listing them in text mode, white text on black background, was a bit too much, I think) That's only really applicable in Windows. In Linux all the plugins are scanned so quickly you never even see that printout -- |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: Thomas: Yes, that's how it's supposed to be. But for some reason this doesn't work for me in Linux (it works in Windows though)... Then maybe theres something wrong with YOUR system? Seems to work for several other people. -- |
miran
Member #2,407
June 2002
|
Well, yeah, it looks like it... -- |
juvinious
Member #5,145
October 2004
|
That's the pita of binary based distros. Anyhow, I've updated my missle defend clone to use game_path so that it can be loaded in any directory. It's attached, if not you can grab it from its page. Now if we can get the other plugin developers to update their plugins to use the game_path, my loader will be easier to use. __________________________________________ |
miran
Member #2,407
June 2002
|
Did you by mistake put the wrong source in the tar.gz you attached to your last post? Because your code crashes. Guess what is wrong. Here's a small hint:
Here's another hint for you:
Another minor suggestion: Rename the README file to readme.txt, startup my GUI host program and be amazed. And finally a request from the general public: Could anyone running Windows that also happens to have Allegro 4.2.0, AMGC2 and preferably the MinGW compiler please try to compile a Windows DLL of the game? Here are the instructions: 1. Unpack the game to amgc2/games. 2. Edit the makefile so that line 4 looks like this: SRCDIR=../.. 3. Edit mdefend.cpp so that the code starting at line 2271 looks like the second snippet in this post. 4. Run "make win" and ignore all the warnings. 5. Run amgc2.exe to verify that mdefend.dll works. 6. Attach mdefend.dll here or send to my email (in amgc2's readme.txt). 7. Go play a couple of rounds of Missile Defend! It's good! :)
-- |
juvinious
Member #5,145
October 2004
|
Quote: Because your code crashes.
Heh, I'm not suprised considering the amgc2loader isn't working for you. ;P On a side note my loader seems to be a tad bit slower than yours, but not incredibly slower, I assume the timing is a bit off in my loader. I just ran it and it worked fine in amgc2 and in the loader. Source attached. (deleted from previous post) __________________________________________ |
GullRaDriel
Member #3,861
September 2003
|
I was trying to compile it and put it here, but I got errors:
Lots of warnings before, and I was forced to change OBJDIR to obj/mingw32 instead of obj\mingw32 We will see later ;-) "Code is like shit - it only smells if it is not yours" |
miran
Member #2,407
June 2002
|
You need MASkinG from CVS. But why do you want to compile AMGC2.exe? Does the precompiled version not work for you? If you just want to compile the game dll, you don't need to compile amgc2 itself, you just need to have its source code. -- |
GullRaDriel
Member #3,861
September 2003
|
I don't have CVS allowed trough our fucking proxy. I got some work to finish, and I will try to give you this dll after. "Code is like shit - it only smells if it is not yours" |
miran
Member #2,407
June 2002
|
Quote: I don't have CVS allowed trough our fucking proxy. As I said, you do NOT need MASkinG at all! To compile game dlls you just need a couple of files from the AMGC2 code and plain Allegro. -- |
GullRaDriel
Member #3,861
September 2003
|
Attached is the dll. "Code is like shit - it only smells if it is not yours" |
miran
Member #2,407
June 2002
|
Thanks. Hehe, I was able to compile it myself actually as I'm at work right now where I use a Windows machine and had 15 minutes of time Juvinious: AMGC2 page has been updated and now lists Missile Defend v1.9 -- |
Neil Walker
Member #210
April 2000
|
Hello, (the only thing that would be nice would be an inclusion of online manual for your libraries, e.g. masking) Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
miran
Member #2,407
June 2002
|
Quote:
Hello, (the only thing that would be nice would be an inclusion of online manual for your libraries, e.g. masking) Thanks, that's a good idea. I might even write some tutorials some time... -- |
|
1
2
|