I tried to compiles some blanker source code available on www.os4depot.net For my sample I used the "commander.blanker" one.
By removing all referencies to Picasso96 and CybergraphX, the blanker compiles ... Only problem settings and display are not handled correctly ... but it's not the problem here...
When I try to include MiniGL and compiles the blanker, I get these errors : Quote:
gcc -D__NOLIBBASE__ -D__NOGLOBALIFACE__ -D__AMIGADATE__=\"`c:date LFORMAT %d.%m.%Y`\" -DMINIGL -Wall -Werror -O3 -c -o Blanker_AmiDARK.o Blanker_AmiDARK.c gcc -mcrt=newlib -nostartfiles -lm -o AmiDARK.blanker Blanker_AmiDARK.o -lAmiDARK -lm -lGL -lGLUT /SDK/newlib/lib/libGLUT.a(glutstub.o): In function `glutInit': include/mgl/glut.h:23: multiple definition of `IIntuition' Blanker_AmiDARK.o:(.sbss+0x6c): first defined here /SDK/newlib/lib/libGLUT.a(glutstub.o): In function `glutInit': include/mgl/glut.h:24: multiple definition of `IntuitionBase' Blanker_FlyingFeather.o:(.sbss+0x24): first defined here make: *** [AmiDARK.blanker] Error 1
if I remove intuition definition from the blanker file, I get errors saying that Intuition is not defined ( where some IIntuition->.... calls are made )
Does someone know how to find a solution to "ignore multiple definition" ? or to fix this ?
All we have to decide is what to do with the time that is given to us.
And try to compile Amidark itself with -gstabs options (all the object i mean which you put into libamidark.a), then compile blanker as well with -gstabs, and try to do reboot/prefs/blanker few times, and for one of them it should give you GR, so, you can press stack-trace, and by addr2line detect on which line of code it crashes:
If it crashes on something intuition related - then the problem is it, but if not - then it will show where a problem.
But from my experience i can say that if you compile a binary with that -lauto + USE_INLINE, then all that IFACE stuff are not matter.
@kas1e same. if I keep IIntutionBase in blanker source code, I get "multiple definition of 'IntuitionBase' if I remove it I get it as not defined on the function OpenLibraries of the blanker source code.
All we have to decide is what to do with the time that is given to us.
A few things for you to try: - Put extern in front of your IIntuition definition in Blanker_AmiDARK.c - Try changing the order of the linker libs, e.g., move -lGLUT closer to the front
I'm not sure if GLUT will work within a blanker, as it was designed for standalone apps. Nevertheless, if you can get it working, great.
freddix wrote: @Hans: with what you said, I get this :
1. add extern on Intuition definition :
AmiDARK:Shared/AmiDARK_Blanker.c:72: warning 'IntuitionBase' initialized and declared 'extern' AmiDARK:Shared/AmiDARK_Blanker.c:93: warning 'IIntuition' initialized and declared 'extern' make: *** [Blanker_FlyingFeather.o] Error 1
Even if I remove lines that open library and interface ...
Did you add an = NULL after your declaration of IntuitionBase and IIntuition? If so, remove them. That's the task of whichever source file has the actual global declaration (the GLUT lib, in this case).
gcc -D__NOLIBBASE__ -D__NOGLOBALIFACE__ -D__AMIGADATE__=\"`c:date LFORMAT %d.%m.%Y`\" -Wall -Werror -O3 -gstabs -DMINIGL -c -o Blanker_FlyingFeather.o Blanker_FlyingFeather.c gcc -mcrt=newlib -nostartfiles -lm -o Feather.blanker Blanker_FlyingFeather.o -lAmiDARK -lm -lGL -IGLUT Blanker_FlyingFeather.o: In function `MakeGUI': AmiDARK:Shared/AmiDARK_Blanker.c:1258: undefined reference to `IIntuition' AmiDARK:Shared/AmiDARK_Blanker.c:1258: undefined reference to `IIntuition' AmiDARK:Shared/AmiDARK_Blanker.c:1258: undefined reference to `IIntuition' AmiDARK:Shared/AmiDARK_Blanker.c:1258: undefined reference to `IIntuition' AmiDARK:Shared/AmiDARK_Blanker.c:1258: undefined reference to `IIntuition' Blanker_FlyingFeather.o:AmiDARK:Shared/AmiDARK_Blanker.c:1258: more undefined references to `IIntuition' follow /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `SETUP_Constructor': /SDK/local/newlib/include/mgl/glut.h:24: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:24: undefined reference to `__glut_current_context' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `SETUP_Destructor': /SDK/local/newlib/include/mgl/glut.h:63: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:63: undefined reference to `__glut_current_context' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `DEShowWindow': /SDK/local/newlib/include/mgl/glut.h:105: undefined reference to `__glut_current_context' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o):/SDK/local/newlib/include/mgl/glut.h:105: more undefined references to `__glut_current_context' follow /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `LoadPicture': AmiDARK:Shared/AmigaOS4/AmigaOS_DataTypes.c:94: undefined reference to `IIntuition' AmiDARK:Shared/AmigaOS4/AmigaOS_DataTypes.c:94: undefined reference to `IIntuition' AmiDARK:Shared/AmigaOS4/AmigaOS_DataTypes.c:111: undefined reference to `IIntuition' AmiDARK:Shared/AmigaOS4/AmigaOS_DataTypes.c:121: undefined reference to `IIntuition' AmiDARK:Shared/AmigaOS4/AmigaOS_DataTypes.c:121: undefined reference to `IIntuition' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `DESetWindowOff': /SDK/local/newlib/include/mgl/glut.h:255: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:255: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:261: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:266: undefined reference to `displayWarningReq' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `DESetDisplayMode': AmiDARK:Shared/Setup/setup.c:36: undefined reference to `__glut_current_context' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `DESetDisplayMode': /SDK/local/newlib/include/mgl/glut.h:39: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:29: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:34: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:45: undefined reference to `__glut_current_context' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o):/SDK/local/newlib/include/mgl/glut.h:63: more undefined references to `__glut_current_context' follow /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `DESetDisplayMode': /SDK/local/newlib/include/mgl/glut.h:50: undefined reference to `displayWarningReq' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o): In function `DarkENGINE_End': /SDK/local/newlib/include/mgl/glut.h:145: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:145: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:150: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:170: undefined reference to `__glut_current_context' /SDK/local/newlib/include/mgl/glut.h:175: undefined reference to `__glut_current_context' /SDK/local/newlib/lib/libAmiDARK.a(libAmiDARK.o):/SDK/local/newlib/include/mgl/glut.h:145: more undefined references to `__glut_current_context' follow make: *** [Feather.blanker] Error 1
Even if I change the position of -IGLUT in the link.
All we have to decide is what to do with the time that is given to us.
I haven't changes the blanker inside the lib, it's always the commander one. When I try to test module ... it send grim reaper ... I'll try to find how to fix this ... The preview of the blanker work ok.
EDIT : I've fixed the crash but readding the openlibrary/getinterface for Intuition. (I think MiniGL is not automatically setup when the lib is run)
All we have to decide is what to do with the time that is given to us.
@Shadow: Thank you for the link. I will download them later today (when I'll be back at home :) ) But, is there a way to DL everything at once ? because there are lots of files there :p @+ AmiDARK.
All we have to decide is what to do with the time that is given to us.
@Shadow already tried ... don't work ... Zip ... BZ ... GZip ... don't work too :(
EDIT : And, more to this, when I want to save 1 file ( right click and save target as ... ) it save the file as .htm file format with the entire page setup ... not only the source code :(
All we have to decide is what to do with the time that is given to us.
I just noticed the 404 and reported it to bitbucket. Maybe the source archives are only generated once a day or something and has not been generated yet.
For my other repository on bitbucket it works fine.
@shadow Maybe if you doest mind we also can upload it on os4depot ? That will help a lot later for everyone who will want to write a blanker (more examples the better).
@freddix Why i ask, its just in hope that it was crash on mglut (as for me with latest version of amidark), and maybe you fix something like that :)