Closed ruoqingsun closed 7 years ago
Are you on mac or linux? If you're on linux, it looks like you'll need to install X11
I am currently on mac with MacOS Sierra version 10.12.1
Oh, then use the osx makefiles
I have installed XQuartz in my system and go on trying to compile the AntTweakBar in project Libigl with command "make -f Makefile".
Here are two other problems come to me and I have fixed.
MacOS donent's have "gcc -soname" and library "-lGL". Instead, "gcc -install_name" and "-framework OpenGL" seem correct.
But I came up with another problem when I running the make file:
Ruoqings-Air:src ruoqingsun$ gcc -shared -Wl,-install_name,libAntTweakBar.so.1 -o ../lib/libAntTweakBar.so TwColors.o TwFonts.o TwOpenGL.o TwOpenGLCore.o TwBar.o TwMgr.o TwPrecomp.o LoadOGL.o LoadOGLCore.o TwEventGLFW.o TwEventGLUT.o TwEventSDL.o TwEventSDL12.o TwEventSDL13.o TwEventSFML.o TwEventX11.o -framework OpenGL -lstdc++
Undefined symbols for architecture x86_64:
"_XAllocNamedColor", referenced from:
CTwMgr::PixmapCursor(int) in TwMgr.o
"_XCreateBitmapFromData", referenced from:
CTwMgr::PixmapCursor(int) in TwMgr.o
"_XCreateFontCursor", referenced from:
CTwMgr::CreateCursors() in TwMgr.o
"_XCreatePixmapCursor", referenced from:
CTwMgr::PixmapCursor(int) in TwMgr.o
"_XDefineCursor", referenced from:
CTwMgr::SetCursor(unsigned long) in TwMgr.o
"_XFetchBytes", referenced from:
CTwBar::EditInPlaceGetClipboard(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in TwBar.o
"_XFlush", referenced from:
CTwMgr::FreeCursors() in TwMgr.o
CTwMgr::CreateCursors() in TwMgr.o
CTwMgr::PixmapCursor(int) in TwMgr.o
CTwMgr::SetCursor(unsigned long) in TwMgr.o
"_XFree", referenced from:
CTwBar::EditInPlaceGetClipboard(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in TwBar.o
"_XFreeCursor", referenced from:
CTwMgr::FreeCursors() in TwMgr.o
"_XFreePixmap", referenced from:
CTwMgr::PixmapCursor(int) in TwMgr.o
"_XLookupString", referenced from:
_TwEventX11 in TwEventX11.o
"_XSetErrorHandler", referenced from:
CTwMgr::FreeCursors() in TwMgr.o
CTwMgr::CreateCursors() in TwMgr.o
CTwMgr::PixmapCursor(int) in TwMgr.o
CTwMgr::SetCursor(unsigned long) in TwMgr.o
"_XSetSelectionOwner", referenced from:
CTwBar::EditInPlaceSetClipboard(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TwBar.o
"_XStoreBytes", referenced from:
CTwBar::EditInPlaceSetClipboard(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TwBar.o
"_XSync", referenced from:
CTwMgr::FreeCursors() in TwMgr.o
CTwMgr::CreateCursors() in TwMgr.o
CTwMgr::PixmapCursor(int) in TwMgr.o
CTwMgr::SetCursor(unsigned long) in TwMgr.o
"_glXGetCurrentDisplay", referenced from:
CTwMgr::FreeCursors() in TwMgr.o
_TwDraw in TwMgr.o
CTwMgr::CreateCursors() in TwMgr.o
CTwMgr::PixmapCursor(int) in TwMgr.o
CTwMgr::SetCursor(unsigned long) in TwMgr.o
"_glXGetCurrentDrawable", referenced from:
_TwDraw in TwMgr.o
CTwMgr::SetCursor(unsigned long) in TwMgr.o
"_glXGetProcAddressARB", referenced from:
LoadOpenGL() in LoadOGL.o
LoadOpenGLCore() in LoadOGLCore.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there any library that I missed?
I understand what you mean. I should use the following command
make -f makefile.osx
Thanks
I want to compile the whole libigl project to generate all the lib files.
mkdir -p lib
cd lib
cmake -DCMAKE_BUILD_TYPE=Release ../optional
make
Then I can generate a bunch of libraries in the lib folder. But the file libiglbbw.a is missing. Should I add any line in the makefile to let libigl to generate the libiglbbw.a ?
I think the probable reason is that Libigl perhaps have some updates about bbw but corresponding modification hasn't been done here (as there is no extra directory in libigl regarding bbw). Could you please somehow update related codes?
There's a mismatch between the current libigl (12-07-16) and the libigl that this FAST repo is expecting (05-2016). I'm going to make libigl a submodule to freeze which commit of libigl is expected to get this to compile. Stay tuned.
Great. It would be appreciated if you can inform me here when the submodule is done. Thanks a lot!
Should be working now. At least on mac osx. Please re-clone with the --recursive option.
It works!!!Thanks for your effort 👍 👍 👍
I am try to use the command "make -f Makefile.static" as the manual said to include AntTweakerBar into libigl. It seems not working for me. I got the following return.
Later I also tried "make -f Makefile". The system is not able to include X11. Could you provide any help to this issue?