irrlicht lib osx
-
inx
irrlicht lib osx
hello
i compiled the library libirrlicht on osx without birg problems.
but if i try to build the "hello world" example and start it, i get this error:
ZeroLink: unknown symbol '__ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
the only thing i do in the code is creating the irrlicht-device (EDT_NULL, i get the same error with EDT_OPENGL or EDT_SOFTWARE):
IrrlichtDevice *device =createDevice(EDT_NULL, dimension2d<s32>(640, 480), 16, false, false, false, 0);
is this a problem with the lib?
can anybody help me with this?
thx
inx
i compiled the library libirrlicht on osx without birg problems.
but if i try to build the "hello world" example and start it, i get this error:
ZeroLink: unknown symbol '__ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
the only thing i do in the code is creating the irrlicht-device (EDT_NULL, i get the same error with EDT_OPENGL or EDT_SOFTWARE):
IrrlichtDevice *device =createDevice(EDT_NULL, dimension2d<s32>(640, 480), 16, false, false, false, 0);
is this a problem with the lib?
can anybody help me with this?
thx
inx
-
Conquistador
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
There is no OSX port for Irrlicht yet, you'll have to wait for another release, or port it yourself.
Royal Hamilton Light Infantry - http://www.rhli.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
-
Guest
-
Conquistador
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
I doubt it. I think there's different ways each OS does a certain thing, like initializing windows, rendering contexts, etc. Even if you could compile the library, I doubt it would work.
Royal Hamilton Light Infantry - http://www.rhli.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
-
hybrid
Now, that's definitely not the problem! He obviously ported it already as it compiled without a problem (Ok, not the whole way, yet, but quite good).Conquistador wrote:There is no OSX port for Irrlicht yet, you'll have to wait for another release, or port it yourself.
First of all try build the static library (libIrrlicht.a) and avoid the crappy dynamic unix loader for OSX. Now, you should get the error at compile time already, but it might also be solved since symbol export is sometimes the problem (like with DLL_ENTRY under windows). And be sure to avoid simple linker problems such as using custom libraries for apps compiled with standard ones etc. And turn on compiler warnings to get such errors as soon as possible.inx wrote:i compiled the library libirrlicht on osx without big problems.
but if i try to build the "hello world" example and start it, i get this error:
ZeroLink: unknown symbol '__ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'
Another problem which might occur is that the proper defines are not set, because your system is no Linux system. So check Irrlicht.h and be sure that the Linux define is set if compiling for OSX. Otherwise the interface implementations might be empty (not missing, though).
The next thing you'll encounter is big/little endian so most textures and 3d object files won't work for you. Thus, if your app crashes upon mesh creation you have such a problem. It's usually due to malloc'ing some GB of ram for a texture, which is refused and the app cores right away. Fixing this problem is much more work, as you'll have to patch all reading routines and swap read in numbers. So best of start without textures!
I have the Mac parts from IrrlichtNX as a patch, so if you want to start and extend it to work with current Irrlicht I can send them to you. But also contact Niko as he should have some Mac port already sent in from someone else. So he might also have some ideas about method names etc.
-
Guest
thanks for the reply.
i'm compiling the library as static, without any complaints from make (except warnings about unused variables).
im working on a very clean system, installed a month ago, there are only zlib, libjpeg and libpng i compiled. so there shouldnt be a mishmash with other libraries.
what im doing is, that i use the openGL.framework, which should work (?)
and i looked into the Irrlicht.h file. there is no define for linux. or do you mean, that i have to check every single .h file?
thanks.
inx
i'm compiling the library as static, without any complaints from make (except warnings about unused variables).
im working on a very clean system, installed a month ago, there are only zlib, libjpeg and libpng i compiled. so there shouldnt be a mishmash with other libraries.
what im doing is, that i use the openGL.framework, which should work (?)
and i looked into the Irrlicht.h file. there is no define for linux. or do you mean, that i have to check every single .h file?
thanks.
inx
-
Guest
-
Guest
what ive done in the meantime:
skipped the xcode-project, where i tried to build the static library before and switched to terminal.
- i set the library-searchpath in the Makefile so, that the compiler can also find the GL-libraries and GL-headers included in /usr/X11R6/ and the other librariers (libjpeg, libpng, zlib in /usr/local)
- outcometed/deleted the stuff i dont need (make libjped, libpng, zlib and the CD3D8*.o CD3D9*.o and CIrrDeviceWin32.o)
so the library compiles and links.
then i switched to the hello-world example and typed make:
- it seams that it finds more than one definition of the libGL (the one in X11R6 and the Framework) i dont know how to avoid that it finds the Framework. in the Makefile only the path to X11R6 is specified. in my exports is no LDPATH or Includepath set
these are the errors:
g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
/usr/bin/ld: warning multiple definitions of symbol _glPointParameteri
/usr/X11R6/lib/libGL.dylib(dri_dispatch.o) definition of _glPointParameteri
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) definition of _glPointParameteri
/usr/bin/ld: warning multiple definitions of symbol _glPointParameteriv
/usr/X11R6/lib/libGL.dylib(dri_dispatch.o) definition of _glPointParameteriv
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) definition of _glPointParameteriv
/usr/bin/ld: Undefined symbols:
_inflate
_inflateEnd
_inflateInit2_
_jpeg_CreateDecompress
_jpeg_destroy_decompress
_jpeg_finish_decompress
_jpeg_read_header
_jpeg_read_scanlines
_jpeg_resync_to_restart
_jpeg_start_decompress
_jpeg_std_error
_png_check_sig
_png_create_info_struct
_png_create_read_struct
_png_destroy_read_struct
_png_error
_png_get_IHDR
_png_get_rowbytes
_png_read_info
_png_read_row
_png_read_update_info
_png_set_read_fn
_png_set_sig_bytes
collect2: ld returned 1 exit status
make: *** [all] Error 1
thats the point where i definetly need some help.
sorry for the long post, im hoping that anybody can help me there.
thanx
inx
skipped the xcode-project, where i tried to build the static library before and switched to terminal.
- i set the library-searchpath in the Makefile so, that the compiler can also find the GL-libraries and GL-headers included in /usr/X11R6/ and the other librariers (libjpeg, libpng, zlib in /usr/local)
- outcometed/deleted the stuff i dont need (make libjped, libpng, zlib and the CD3D8*.o CD3D9*.o and CIrrDeviceWin32.o)
so the library compiles and links.
then i switched to the hello-world example and typed make:
- it seams that it finds more than one definition of the libGL (the one in X11R6 and the Framework) i dont know how to avoid that it finds the Framework. in the Makefile only the path to X11R6 is specified. in my exports is no LDPATH or Includepath set
these are the errors:
g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
/usr/bin/ld: warning multiple definitions of symbol _glPointParameteri
/usr/X11R6/lib/libGL.dylib(dri_dispatch.o) definition of _glPointParameteri
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) definition of _glPointParameteri
/usr/bin/ld: warning multiple definitions of symbol _glPointParameteriv
/usr/X11R6/lib/libGL.dylib(dri_dispatch.o) definition of _glPointParameteriv
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) definition of _glPointParameteriv
/usr/bin/ld: Undefined symbols:
_inflate
_inflateEnd
_inflateInit2_
_jpeg_CreateDecompress
_jpeg_destroy_decompress
_jpeg_finish_decompress
_jpeg_read_header
_jpeg_read_scanlines
_jpeg_resync_to_restart
_jpeg_start_decompress
_jpeg_std_error
_png_check_sig
_png_create_info_struct
_png_create_read_struct
_png_destroy_read_struct
_png_error
_png_get_IHDR
_png_get_rowbytes
_png_read_info
_png_read_row
_png_read_update_info
_png_set_read_fn
_png_set_sig_bytes
collect2: ld returned 1 exit status
make: *** [all] Error 1
thats the point where i definetly need some help.
sorry for the long post, im hoping that anybody can help me there.
thanx
inx
-
hybrid
This port would not use MacOS native rendering, of course. But since OSX has X11 support there should be no problems getting this to work.Conquistador wrote:I doubt it. I think there's different ways each OS does a certain thing, like initializing windows, rendering contexts, etc. Even if you could compile the library, I doubt it would work.
-
Guest
hello
next day next luck
i forgot to link the libraries zlib, libjpeg and libpng into the libIrrlicht.a
i build everthing new, it seems that everything is in the library, what it needs, no errors about undefined symbols.
the only thing is, that i dont know how to get rid of the double-definition of 2 GLParameter. they are found in the X11R6-library and in the OpenGL.Frameworkl from apple.
in the examples Makefile, there is only the searchpath to /usr/X11R6/ set, so why does the compiler find the framework? i checked my exports, no path to the frameworks....
inx
next day next luck
i forgot to link the libraries zlib, libjpeg and libpng into the libIrrlicht.a
i build everthing new, it seems that everything is in the library, what it needs, no errors about undefined symbols.
the only thing is, that i dont know how to get rid of the double-definition of 2 GLParameter. they are found in the X11R6-library and in the OpenGL.Frameworkl from apple.
in the examples Makefile, there is only the searchpath to /usr/X11R6/ set, so why does the compiler find the framework? i checked my exports, no path to the frameworks....
inx
-
Guest
it seems to work in a kind of way.
the double-definitions are just compiler-warning. i missunderstood this. so the example program compiles now.
if i start it (in X11) it couldnt load the default texture. thats the termimnal output:
Irrlicht Engine version 0.14.0
Linux Darwin 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC
Could not load texture: #DefaultFont
Error: Could not load built-in Font.
^C
(i aborted the program)
does anybody have an idea, what to do next?
thanks for advice.
inx
the double-definitions are just compiler-warning. i missunderstood this. so the example program compiles now.
if i start it (in X11) it couldnt load the default texture. thats the termimnal output:
Irrlicht Engine version 0.14.0
Linux Darwin 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC
Could not load texture: #DefaultFont
Error: Could not load built-in Font.
^C
(i aborted the program)
does anybody have an idea, what to do next?
thanks for advice.
inx
-
hybrid
Try the example with custom scene node. It does not use textures so it should work. Loading of bitmap textures will fail since they store their dimension in the first bytes. Your computer would alloc lots of megabytes by misinterpreting these numbers. So it fails all the time.
I'd assume that libjpeg and libpng have their own techniques of correct endian handling. So check if jpeg or png textures are working with a very small example only (to avoid any unnecessary problems). But I suppose that if you're using your system libraries it shoudl work.
All other endian problems (such as 3ds and md2 loaders won't work) need special handling. You have to apply a bswap() on every number read since all numbers are stored in little endian. So make a define IRRSWAP(num) and make it either bswap or not depending on your system.
You can test the IrrlichtNX changes for endianess (and some more for Mac file system etc.) in this file: http://parsys.informatik.uni-oldenburg. ... dian.patch. Note that this patch can't be applied to any Irrlicht version without problems. But it shoudl give some hints on where to change current Irrlicht sources to make this work.
Please keep us informed about your progress
I'd assume that libjpeg and libpng have their own techniques of correct endian handling. So check if jpeg or png textures are working with a very small example only (to avoid any unnecessary problems). But I suppose that if you're using your system libraries it shoudl work.
All other endian problems (such as 3ds and md2 loaders won't work) need special handling. You have to apply a bswap() on every number read since all numbers are stored in little endian. So make a define IRRSWAP(num) and make it either bswap or not depending on your system.
You can test the IrrlichtNX changes for endianess (and some more for Mac file system etc.) in this file: http://parsys.informatik.uni-oldenburg. ... dian.patch. Note that this patch can't be applied to any Irrlicht version without problems. But it shoudl give some hints on where to change current Irrlicht sources to make this work.
Please keep us informed about your progress
-
inx
hello
my progress for now:
i compiled the example without texture, which did fine. but if i start it, Xlib complains about the missing extension : XFree86-VidModeExtension
so i got the XFree86 source and compiled the whole thing with the XFree86-VidMode extension. which is defined in the darwin.cf file (./xc/config/cf/darwin.cf)
then i built the libIrrlicht.a again, and the example. but the error didn't go away. right now im compiling everything again, and erase the whole X11 stuff before. just to be sure.
maybe somebody can help me here? ill report the result after rebuilding X11 with VidModeExtension.
thanks for any tips.
inx
thx for the patch. ill do that, if the first example starts up....
my progress for now:
i compiled the example without texture, which did fine. but if i start it, Xlib complains about the missing extension : XFree86-VidModeExtension
so i got the XFree86 source and compiled the whole thing with the XFree86-VidMode extension. which is defined in the darwin.cf file (./xc/config/cf/darwin.cf)
then i built the libIrrlicht.a again, and the example. but the error didn't go away. right now im compiling everything again, and erase the whole X11 stuff before. just to be sure.
maybe somebody can help me here? ill report the result after rebuilding X11 with VidModeExtension.
thanks for any tips.
inx
thx for the patch. ill do that, if the first example starts up....
-
hybrid
The VidModeExtension is used for Fullscreen display with X11. But there are only a few lines in the Linux driver file which require this extension, so it could be simpler to remove fullscreen mode in Irrlicht. If you apply the Linux patch files from http://parsys.informatik.uni-oldenburg. ... d/irrlicht you should find a define which removes exactly that part. I also have the problem that this extension does not work for some of my remote X displays, so I added that workaround.inx wrote: i compiled the example without texture, which did fine. but if i start it, Xlib complains about the missing extension : XFree86-VidModeExtension