Ashish,
This is likely related to fact that there two different ways to link
to OpenGL on the Apple platform. One is the Apple OpenGL Framework
and the other is OpenGL in the X11 environment. Which one you choose
depends on how you plan to use vgui. Specifically which GUI toolkit
you will be using. I recommend Qt4 with the Apple OpenGL Framework
because it is better integrated with the standard Apple user
interface. However, if you want to use GTK2 then you will need the
X11 OpenGL.
It's possible that you may have some incompatible combination of
these two versions of OpenGL in your CMake configuration which might
cause an error like that. The CMake module for finding OpenGL does
not provide a way for the user to specify which version of OpenGL to
include. You may need to manually configure some of the CMake
variables. In my case I manually set the X11 variables to "IGNORE" so
that they would not interfere with the OpenGL Framework. If you are
using the OpenGL Framework make sure the following CMake variables are
set as indicated below:
OPENGL_INCLUDE_DIR
/System/Library/Frameworks/OpenGL.framework
OPENGL_gl_LIBRARY
/System/Library/Frameworks/OpenGL.framework
OPENGL_glu_LIBRARY /System/Library/Frameworks/AGL.framework
X11_INCLUDE_DIR IGNORE
X11_X11_INCLUDE_PATH IGNORE
X11_X11_LIB IGNORE
X11_X11_LIBRARY IGNORE
X11_Xext_LIB IGNORE
X11_Xext_LIBRARY IGNORE
X11_Xlib_INCLUDE_PATH IGNORE
X11_Xutil_INCLUDE_PATH IGNORE
Good Luck,
Matt
On Wed, Feb 27, 2008 at 5:36 AM, Agrawal Ashish
<agrawala@...> wrote:
> Hi
>
> I have downgraded to version 10.4.11 and now I dont see this error.
>
> But `I am getting following error while building the vgui.
>
> [ 51%] Building CXX object core/vgui/tests/CMakeFiles/vgui_test_acceleration.dir/test_acceleration.o
> Linking CXX executable vgui_test_acceleration
> /usr/bin/ld: Undefined symbols:
> _glXChooseVisual
> _glXCreateContext
> _glXMakeCurrent
> _glXSwapBuffers
>
> collect2: ld returned 1 exit status
> make[2]: *** [core/vgui/tests/vgui_test_acceleration] Error 1
> make[1]: *** [core/vgui/tests/CMakeFiles/vgui_test_acceleration.dir/all] Error 2
> make: *** [all] Error 2
>
> Where I am making mistakes here?
>
> Thanks in advance.
>
> Regards,
>
> Ashish
>
>
> -----Original Message-----
> From: Matt Leotta [mailto:matt.leotta@...]
>
>
> Sent: Fri 2/15/2008 3:51 PM
> To: Agrawal Ashish
> Cc: vxl-users@...
> Subject: Re: [Vxl-users] Installing on Mac
>
> Ashish,
>
> I have seen that error before. Following the same work around that
> you found I set all three of the following CMake variables to have the
> following value:
>
> CMake variables
> ------------------------
> CMAKE_EXE_LINKER_FLAGS
> CMAKE_MODULE_LINKER_FLAGS
> CMAKE_SHARED_LINKER_FLAGS
>
> Value assigned to CMake variables (all one line)
> ---------------------------------------------------
> -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
>
> My build was successful after adding these definitions. Later I
> went back to determine which of these 3 variables actually needed to
> be assigned this value. I removed them one at a time and recompiled.
> After removing all 3, it still compiled. I currently have no trace of
> that dylib_file workaround anywhere in my build tree, and it still
> works. I'm puzzled by this, but haven't had time to investigate
> further.
>
> --Matt
>
>
> On Fri, Feb 15, 2008 at 8:57 AM, Agrawal Ashish
> <agrawala@...> wrote:
> > I tried the same way as suggested for linux and it worked. but now the problem is make is getting broken on Mac OS Version 10.5.2 Leopard. I got the following error
> >
> > [ 50%] Building CXX object core/vgui/examples/CMakeFiles/basic01_display_image.dir/basic01_display_image.o
> > Linking CXX executable basic01_display_image
> > ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
> > collect2: ld returned 1 exit status
> > make[2]: *** [core/vgui/examples/basic01_display_image] Error 1
> > make[1]: *** [core/vgui/examples/CMakeFiles/basic01_display_image.dir/all] Error 2
> > make: *** [all] Error 2
> >
> > I found that this bug is addressed on some forum http://lists.apple.com/archives/x11-users/2007/Oct/msg00146.html. They proposed the following solution
> >
> > A bug on 10.5.0 (which will not be fixed for release) causes issues when linking OpenGL libraries. The fix is to add some form of "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" to LDFLAGS or equivalent.
> >
> > Can you please let me know where I need to make necessary changes to make it work.
> >
> > Thanks,
> > Ashish
> >
> >
> >
> >
> > -----Original Message-----
> > From: Matt Leotta [mailto:matt.leotta@...]
> > Sent: Wed 2/13/2008 5:31 PM
> > To: Agrawal Ashish
> > Cc: vxl-users@...
> >
> >
> > Subject: Re: [Vxl-users] Installing on Mac
> >
> > Ashish,
> >
> > Please be more specific. What is the CMake error you are
> > experiencing? You are correct to follow the instructions for linux,
> > as the procedure is nearly the same on OS X.
> >
> > --Matt Leotta
> >
> > On Feb 13, 2008 11:17 AM, Agrawal Ashish <agrawala@...> wrote:
> > > Hi,
> > >
> > > I am very new MAC user.
> > >
> > > I am installing VXL 1.10.0 on Mac OS X Version 10.5.2. Processor Intel Core 2 Duo.
> > > To install the cmake, I choose "Mac OSX Universal (.dmg installer only for Tiger)" from http://www.cmake.org/HTML/Download.html. I can not see any source given for MAC. Installed just clicking on it.
> > >
> > > Now I downloaded the VLX-1.10, but there is no instruction to install it on mac. I tried it doing as instructed for linux machine but it did not work and showing CCMake error. Can you please provide me the way so that I can solve this problem.
> > >
> > > Thanks,
> > > Ashish
> > >
> > > -----Original Message-----
> > > From: vxl-users-bounces@... on behalf of Peter Vanroose
> > > Sent: Wed 2/13/2008 4:57 PM
> > > To: Jacob Bensabat
> > > Cc: vxl-users@...
> > > Subject: Re: [Vxl-users] RTree
> > >
> > > -- Jacob Bensabat <jbensabat@...> wrote:
> > > > Hi
> > > > Could you please provide sample code on how to use RTree
> > > > thanks
> > > > jac
> > >
> > > I presume you mean vgl_rtree.
> > > The best channel to pose these kind of questions is through the
> > > vxl-users mailing list.
> > >
> > > I've never used that class myself. It was written by Frederic
> > > Schaffalitzky at Oxford University, and there seems to be no sample
> > > programs in vxl using it.
> > >
> > > Is anyone on the list using this class, and willing to share
> > > his/her "sample use" program? (Just send it to me, and I'll take
> > > care of adding it to vxl/core/vgl/examples/.)
> > >
> > > -- Peter.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > > __________________________________________________________
> > > Låna pengar utan säkerhet. Jämför vilkor online hos Yahoo!
> > > http://shopping.yahoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by: Microsoft
> > > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > > _______________________________________________
> > > Vxl-users mailing list
> > > Vxl-users@...
> > > https://lists.sourceforge.net/lists/listinfo/vxl-users
> > >
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by: Microsoft
> > > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > > _______________________________________________
> > > Vxl-users mailing list
> > > Vxl-users@...
> > > https://lists.sourceforge.net/lists/listinfo/vxl-users
> > >
> >
> >
> >
>
>
|