Cocos2d 0.8.2 (from 0.7.2) - cocos2d-iphone

I am switching from cocos2d 0.7.2 to 0.8.2 for cocosdenshion, but now i get 7 errors!
Undefined symbols:
"_OBJC_IVAR_$_TransitionScene.inSceneOnTop", referenced from:
_OBJC_IVAR_$_TransitionScene.inSceneOnTop$non_lazy_ptr in PageTurnTransition.o
"_inflateEnd", referenced from:
_inflateMemory_ in ZipUtils.o
_inflateMemory_ in ZipUtils.o
_inflateMemory_ in ZipUtils.o
"_OBJC_IVAR_$_CocosNode.anchorPoint_", referenced from:
_OBJC_IVAR_$_CocosNode.anchorPoint_$non_lazy_ptr in BitmapFontAtlas.o
"_inflate", referenced from:
_inflateMemory_ in ZipUtils.o
"_OBJC_IVAR_$_CocosNode.position_", referenced from:
_OBJC_IVAR_$_CocosNode.position_$non_lazy_ptr in ParallaxNode.o
"_inflateInit2_", referenced from:
_inflateMemory_ in ZipUtils.o
"_OBJC_IVAR_$_CocosNode.contentSize_", referenced from:
_OBJC_IVAR_$_CocosNode.contentSize_$non_lazy_ptr in BitmapFontAtlas.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Please help

It appears that you haven't included the proper headers or linked the proper modules.

Related

How do I fix my current openGL error, my cmakelist may be my issue [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 10 months ago.
Improve this question
I have included the library <GLUT/glut.h> and all my syntax is correct, yet I am receiving this error.
Undefined symbols for architecture arm64:
"_glBegin", referenced from:
triangle(float*, float*, float*) in main.cpp.o
"_glClear", referenced from:
displayTriangle() in main.cpp.o
"_glClearColor", referenced from:
_main in main.cpp.o
"_glColor3f", referenced from:
drawTetrahedron(int) in main.cpp.o
"_glEnable", referenced from:
_main in main.cpp.o
"_glEnd", referenced from:
triangle(float*, float*, float*) in main.cpp.o
"_glFlush", referenced from:
displayTriangle() in main.cpp.o
"_glLoadIdentity", referenced from:
displayTriangle() in main.cpp.o
"_glMatrixMode", referenced from:
reshapeWindow(int, int) in main.cpp.o
"_glOrtho", referenced from:
reshapeWindow(int, int) in main.cpp.o
"_glVertex3fv", referenced from:
triangle(float*, float*, float*) in main.cpp.o
"_glViewport", referenced from:
reshapeWindow(int, int) in main.cpp.o
"_glutCreateWindow", referenced from:
_main in main.cpp.o
"_glutDisplayFunc", referenced from:
_main in main.cpp.o
"_glutInit", referenced from:
_main in main.cpp.o
"_glutInitDisplayMode", referenced from:
_main in main.cpp.o
"_glutInitWindowSize", referenced from:
_main in main.cpp.o
"_glutMainLoop", referenced from:
_main in main.cpp.o
"_glutPostRedisplay", referenced from:
reshapeWindow(int, int) in main.cpp.o
"_glutReshapeFunc", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
My cmakefile I feel like is my issue, but I have no idea where to begin.
Please provide more details like your relevant section of CMakeLists.txt for getting more info and getting quicker help from community.
Now, coming to the error logs, it seems you are cross-compiling the source files using a arm-based compilers.
The error message "ld: symbol(s) not found for architecture arm64" looks to me as a linker issue and you should be having the find_package() and linking calls in CMakeLists.txt for OpenGL.
So to start with , you should follow two steps initially and see if it solves your problem:
1. Make sure the CMake build system is pointing to correct compiler tool chain path (arm compilers in here).
Refer official website of CMake for same:
https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html
2. Make sure you are linking OpenGL
find_package(OpenGL REQUIRED)
target_include_directories(your_executable_name PUBLIC ${OPENGL_INCLUDE_DIR})
target_link_libraries(your_executable_name PUBLIC ${OPENGL_LIBRARIES})

Error while compiling cocos2d-x v3 IOS project,on integrating AdMob (IOS) framework

When i compile my cocos2d-x V3 project in Xcode, it runs fine but on including AdMob framework, it displays following linker error.
I already have included "-ObjC" in "Other linker" section under Build Settings.
Undefined symbols for architecture armv7:
"_kCMTimeZero", referenced from:
-[GADVideoPlayer setAudioMixVolume:] in GoogleMobileAds(GADVideoPlayer.o)
"_CMTimeMakeWithSeconds", referenced from:
-[GADVideoPlayer seekToTime:] in GoogleMobileAds(GADVideoPlayer.o)
"_CMTimeGetSeconds", referenced from:
-[GADVideoPlayer notifyVideoPlayerWithTime:] in GoogleMobileAds(GADVideoPlayer.o)
-[GADVideoPlayer notifyVideoReadyToPlay] in GoogleMobileAds(GADVideoPlayer.o)
"_CMTimeMake", referenced from:
-[GADVideoPlayer observePlayer] in GoogleMobileAds(GADVideoPlayer.o)
"_OBJC_CLASS_$_EKEventEditViewController", referenced from:
objc-class-ref in GoogleMobileAds(GADOpener.o)
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in GoogleMobileAds(GADOpener.o)
"_SCNetworkReachabilityCreateWithAddress", referenced from:
l001 in GoogleMobileAds(GADGestureUtil.o)
"_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
objc-class-ref in GoogleMobileAds(GADDevice.o)
objc-class-ref in GoogleMobileAds(GADOpener.o)
"_SCNetworkReachabilitySetCallback", referenced from:
___35-[GADNetwork enableNetworkChecking]_block_invoke in GoogleMobileAds(GADNetwork.o)
"_SCNetworkReachabilityGetFlags", referenced from:
l001 in GoogleMobileAds(GADGestureUtil.o)
"_OBJC_CLASS_$_EKEventStore", referenced from:
objc-class-ref in GoogleMobileAds(GADSlot+MRAID.o)
objc-class-ref in GoogleMobileAds(GADOpener.o)
"_SCNetworkReachabilitySetDispatchQueue", referenced from:
___35-[GADNetwork enableNetworkChecking]_block_invoke in GoogleMobileAds(GADNetwork.o)
___36-[GADNetwork disableNetworkChecking]_block_invoke in GoogleMobileAds(GADNetwork.o)
"_OBJC_CLASS_$_EKEvent", referenced from:
objc-class-ref in GoogleMobileAds(GADOpener.o)
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in GoogleMobileAds(GADDevice.o)
objc-class-ref in GoogleMobileAds(GADInAppPurchaseTransactionReporter.o)
objc-class-ref in GoogleMobileAds(GADGestureIdUtil.o)
objc-class-ref in GoogleMobileAds(GADMAdURLAdapter.o)
"_SCNetworkReachabilityCreateWithName", referenced from:
___35-[GADNetwork enableNetworkChecking]_block_invoke in GoogleMobileAds(GADNetwork.o)
"_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
objc-class-ref in GoogleMobileAds(GADDevice.o)
"_CTRadioAccessTechnologyDidChangeNotification", referenced from:
___48-[GADDevice enableRadioAccessTechnologyChecking]_block_invoke_2 in GoogleMobileAds(GADDevice.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ahh! finally solved it by adding the following frameworks in my project, in Link Binary With Libraries section under Build Phases in Xcode.
AdSupport
AudioToolbox
AVFoundation
CoreGraphics
CoreMedia
CoreTelephony
EventKit
EventKitUI
MessageUI
StoreKit
SystemConfiguration

installing a c++ wrapper for libcurl on OS X [duplicate]

Really stupid C question.
I'm trying to build the source code here so I can start on modifying it for myself
http://curl.haxx.se/libcurl/c/ftpget.html
I download the file, then run
gcc -o test ftpget.c
and get
Undefined symbols:
"_curl_global_init", referenced from:
_main in ccFchguB.o
"_curl_easy_perform", referenced from:
_main in ccFchguB.o
"_curl_easy_setopt", referenced from:
_main in ccFchguB.o
_main in ccFchguB.o
_main in ccFchguB.o
_main in ccFchguB.o
"_curl_easy_cleanup", referenced from:
_main in ccFchguB.o
"_curl_easy_init", referenced from:
_main in ccFchguB.o
"_curl_global_cleanup", referenced from:
_main in ccFchguB.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
which makes no sense to me, because
/usr/local/include/curl/curl.h
exists and has these functions. I'm sure this is some basic c compilation thing I'm missing.
Many thanks for any pointers.
You need to link with the curl library:
gcc -o test ftpget.c -lcurl

Compiling zathura pdf plugin on mac ld error

I am trying to install zathura-pdf-poppler-0.2.5 on a Mac OS X running Yosemite. When I try and make, I get the following error:
LD pdf.so
Undefined symbols for architecture x86_64:
"_zathura_document_get_data", referenced from:
_pdf_page_links_get in links.o
_pdf_page_init in page.o
"_zathura_document_get_password", referenced from:
_pdf_document_open in document.o
"_zathura_document_get_path", referenced from:
_pdf_document_open in document.o
"_zathura_document_information_entry_list_new", referenced from:
_pdf_document_get_information in meta.o
"_zathura_document_information_entry_new", referenced from:
_pdf_document_get_information in meta.o
"_zathura_document_set_data", referenced from:
_pdf_document_open in document.o
_pdf_document_free in document.o
"_zathura_document_set_number_of_pages", referenced from:
_pdf_document_open in document.o
"_zathura_index_element_new", referenced from:
_pdf_document_index_generate in index.o
_build_index in index.o
"_zathura_link_free", referenced from:
_pdf_page_links_get in links.o
"_zathura_link_new", referenced from:
_poppler_link_to_zathura_link in utils.o
"_zathura_page_get_document", referenced from:
_pdf_page_links_get in links.o
_pdf_page_init in page.o
"_zathura_page_get_height", referenced from:
_pdf_page_links_get in links.o
_pdf_page_search_text in search.o
"_zathura_page_get_index", referenced from:
_pdf_page_init in page.o
"_zathura_page_set_data", referenced from:
_pdf_page_init in page.o
"_zathura_page_set_height", referenced from:
_pdf_page_init in page.o
"_zathura_page_set_width", referenced from:
_pdf_page_init in page.o
"_zathura_plugin_add_mimetype", referenced from:
_zathura_plugin_register in plugin.o
"_zathura_plugin_set_name", referenced from:
_zathura_plugin_register in plugin.o
"_zathura_plugin_set_register_functions_function", referenced from:
_zathura_plugin_register in plugin.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pdf.so] Error 1
I have the following path set in $PKG_CONFIG_PATH:
/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10
Does anyone know how to fix the problem.
Many thanks
I don't know the exact reason that this happens, but I have applied a patch to makefiles and config.mk from MacPort. You can download them in plaintext and use patch Makefile < make.diff and patch config.mk < config.diff to apply the patch.
patch files
I had to change /usr/lib/zathura/pdf.dylib to /usr/lib/zathura/pdf.so after the make install in order to make zathura display pdf files.

Compiling Sphere_2.6a library on Mac OS X

I am trying to compiling sphere_2.6a library on Mac OS X. At the beginning the following parameters are required:
Defined Commands and Options:
Compiler = gcc
Compiler options = -g -m32 -DNARCH_UNIX
Install = cp
Ranlib = ranlib
Archiver = ar ru
The is that I get the following error output:
Undefined symbols for architecture i386:
"_hs_getopt", referenced from:
_main in cc36C6uK.o
"_hs_optind", referenced from:
_main in cc36C6uK.o
"_sp_create_header", referenced from:
_main in cc36C6uK.o
"_sp_fpcopy", referenced from:
_main in cc36C6uK.o
"_sp_get_version", referenced from:
_main in cc36C6uK.o
"_sp_verbose", referenced from:
_main in cc36C6uK.o
"_sp_write_header", referenced from:
_main in cc36C6uK.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [h_add] Error 1
Does anybody know where is the problem?
Thanks a lot,
Giovanni