Hi,
I am trying to build Cocos2d-x linux port on Fedora Core 12.
Been getting a lot of errors and unsuccessful.
Has anyone been successful and can share some tips?
I couldn’t find freeglut3-dev so had to use freeglut-dev on Fedora.
Let me know if any one can help.
cheers,
Darrel
i try to build cocos2d cocos2d-1.0.1-x-0.11.0 release but it fail when i run make in HelloWorld (after i do ./build-linux)
g++ Wallg O2I…/…/cocos2dx/platform/third_party/linux I…/…/cocos2dx/includeI…/…/cocos2dx I…/…/cocos2dx/platformI…/…/CocosDenshion/include ~~I…/Classes/~~DLINUX ./main.o …/Classes/AppDelegate.o …/Classes/HelloWorldScene.o o HelloWorldL…/…/lib/linux/Debug lcocos2dlrt lzlcocosdenshion ~~Wl,~~rpath,…/…/lib/linux/Debug/
/usr/bin/ld: warning: libfmodex64.so, needed by …/…/lib/linux/Debug/libcocosdenshion.so, not found (try using rpath orrpath-link)
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::setOutput(FMOD_OUTPUTTYPE)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::ChannelGroup::getVolume(float*)’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::init(int, unsigned int, void*)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD_System_Create’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::ChannelGroup::addGroup(FMOD::ChannelGroup*)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::setLoopCount(int)’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::setPosition(unsigned int, unsigned int)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::release()’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::setVolume(float)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::close()’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::createChannelGroup(char const**, FMOD::ChannelGroup***)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::isPlaying(bool*)’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::getMasterChannelGroup(FMOD::ChannelGroup**)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::getVolume(float*)’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::ChannelGroup::setVolume(float)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::playSound(FMOD_CHANNELINDEX, FMOD::Sound**, bool, FMOD::Channel***)’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::ChannelGroup::release()‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::stop()’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::update()‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::System::createSound(char const**, unsigned int, FMOD_CREATESOUNDEXINFO**, FMOD::Sound**)’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::setPaused(bool)‘
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::release()’
…/…/lib/linux/Debug/libcocosdenshion.so: undefined reference to `FMOD::Channel::setChannelGroup(FMOD::ChannelGroup*)’
You need to edit cocos2dx/proj.linux/Makefile and CocosDenshion/proj.linux/Makefile and change the directory names that contain Linux
to linux
(lower-case l):
@ …/platform/Linux/CCAplication_linux.o …/platform/Linux/CCEGLView_linux.o
to
@ …/platform/linux/CCAplication_linux.o …/platform/linux/CCEGLView_linux.o
and
OBJECTS = ../Linux/FmodAudioPlayer.o \ ../Linux/SimpleAudioEngine.o \
to
OBJECTS = ../linux/FmodAudioPlayer.o \ ../linux/SimpleAudioEngine.o \
You also have to re-create the shared library links. Do the following in the command line:
cd CocosDenshion/third_party/linux/fmod/lib64/api/lib rm libfmodex64.so libfmodexL64.so ln -s libmodex64-*.so libmodex64.so ln -s libmodexL64-*.so libmodexL64.so
Also edit build-linux.sh and change the cp
command that copies the above shared libraries, since you are using 64-bit Linux (don’t forget the option -a
since it allows copying symlinks):
cp -a CocosDenshion/third-party/linux/fmod/lib64/api/lib/*.so lib/linux/Debug