Cannot pass sprite to function in cocos2dX - c++

I created a new cocos2dx ios project and succeeded to build and run it on ios simulator. But when I try to add a function like
void setImageSize(cocos2d::CCSprite *image, cocos2d::CCSize size);
I got this error.
Undefined symbols for architecture i386:
"HelloWorld::setImageSize(cocos2d::CCSprite*, cocos2d::CCSize)", referenced from:
HelloWorld::initPhysics() in HelloWorldScene.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm new to cocos2dx.
Thanks in advance

Related

My macOS project build failed after upgrade to Xcode9

here is the error description:
Undefined symbols for architecture x86_64: "_verify", referenced
from:
_HIDGetDeviceInfo in HIDUtilities.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
It happened after upgrade Xcode to version 9.1
HIDUtilities.o is not third-party SDK, HIDUtilities.h and HIDUtilities.c are files in my project.
Any suggestion is appreciated, thanks in advance.

Qt, clang & PortAudio: what does those errors mean?

I write a cross-platform audio processing program. It uses Qt 5 and PortAudio library. The platform is Mac OS X Yosemite, clang compiler, Qt Creator 3.4.1 IDE. I got those linker errors:
Undefined symbols for architecture x86_64:
"_ellie2", referenced from:
_main in eltst.o
"_hypergl", referenced from:
_main in ltstd.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What does it mean and what needs to do?

Undefined symbols for architecture x86_64:"cv::face::createFisherFaceRecognizer(int, double)", referenced from: _main in main.o

I am working on facial recognition in video using opencv. I followed the tutorial on opencv's website(http://docs.opencv.org/modules/contrib/doc/facerec/tutorial/facerec_video_recognition.html). I get following error when I try to build my code in xcode.
Undefined symbols for architecture x86_64:
"cv::face::createFisherFaceRecognizer(int, double)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation).
I made a few changes to the code as given in here fatal error: opencv2/contrib/contrib.hpp' file not found (open cv already built)
Please guide me through it as I am new to opencv.
Thanks in advance!

Installing Boost On Mac Issues

Has anyone had this issue on mac while installing boost or know how to fix? I seem to have everything together but this error. I am using OS X 10.10 & and Xcode 6.1.1.
This is what I used for the install and to make the framework.
http://freddy.cellcore.org/post/79587278354/boost-c-libraries-on-osx-xcode-5
https://gist.github.com/faithfracture/c629ae4c7168216a9856
-------------ERROR BELOW---------------
Undefined symbols for architecture x86_64:
"boost::unit_test::unit_test_main(bool (*)(), int, char**)", referenced from:
_main in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Building SDL2 - Undefined symbols for architecture x86_64, libiconv

I have downloaded SDL2 and am trying to build it using the terminal command
./configure --prefix=/home/user/SDL && make && make install
It runs through a laundry list of things, before eventually stopping after spitting out:
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_SDL_iconv in SDL_iconv.o
_SDL_iconv_string in SDL_iconv.o
"_libiconv_close", referenced from:
_SDL_iconv_close in SDL_iconv.o
_SDL_iconv_string in SDL_iconv.o
"_libiconv_open", referenced from:
_SDL_iconv_open in SDL_iconv.o
_SDL_iconv_string in SDL_iconv.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [build/libSDL2.la] Error 1
I have hunted and hunted and have no idea what to do about this. Help?
EDIT:
Breaking it up, ./configure alone works, and then running make afterwords throws up these errors. I don't know if that helps at all.