hey, i'm trying to work with poco on osx snow leopard, compiling via eclipse with the 64bit mac parser,
when trying to compile a simple code using Poco DateTime i get the following error :
"Poco::DateTime::DateTime()", referenced from:
_main in Run.o
"Poco::DateTime::~DateTime()", referenced from:
_main in Run.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [assignment 2] Error 1
does anyone know why this is happening ?
i'm guessing something to do with me compiling 64bit, but installing poco i made sure it compiles to darwin 64bit as well..
SOLVED -- the error was i didn't really compile poco for 64bit..
thanks...
The linker can't find the Poco library. Like aschepler said, check the -l and -L flags. Try edit those flags on the project properties (search for the paths of the libraries)
the problem is that poco needs to be compiled for a 64bit environment in Snow leopard,
although i have ditched eclipse all together now and am using Xcode for c++, so much better.
Related
I’ve been getting this warning when using the Mac terminal and skm library to compile a simple hello world program in C++. I’m new to this so not really sure what to do.
ld: warning: dylib (/Users/chriscommon/.splashkit/lib/macos/libSplashKit.dylib) was built for newer macOS version (10.15.4) than being linked (10.15)
ld: warning: object file (/Users/chriscommon/.splashkit/clang++/lib/macos/libSplashKitCpp.a(splashkit.cpp.o)) was built for newer macOS version (10.15.4) than being linked (10.15)
ld: warning: object file (/Users/chriscommon/.splashkit/clang++/lib/macos/libSplashKitCpp.a(adapter_type_mapper.cpp.o)) was built for newer macOS version (10.15.4) than being linked (10.15)
Does anyone know if there is some way I can resolve this so it links to the correct version? I’m running macOS10.15.7 and have tried to update skm, reinstall Xcode command line tools etc and the program works ultimately but the warnings appear each time I compile.
Try to add this flag to Xcode when you build your program:
-mmacosx-version-min=11.0
I am able to run the cocos 2dx game on the ios simulator, but it gives an error when I try o run it for my desktop. I initially thought it was because of my touch functions, so I disabled them temporarily. It still didn't work. I use a Mac OS X El Capitan 64 bit. Can someone help me with this? The following is the error:
Undefined symbols for architecture x86_64:
"SplashScene::createScene()", referenced from:
AppDelegate::applicationDidFinishLaunching() in AppDelegate.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's definitely possible. But it's hard to help you, because you didn't provided any information about errors you have.
But, you for sure have to set Valid architectures (in desktop target) to i386 and x86_64 if you have something different here.
Trying to compile the tutorial cpp files on http://thrift.apache.org/tutorial/cpp.
I get a couple of these errors:
Undefined symbols for architecture x86_64:
"shared::SharedServiceProcessor::process_getStruct(int,apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*, void*)", referenced from:
I installed boost and thrift using homebrew with updated brew files. Some sources suggested compiling boost and thrift with gcc4.8 and the libstdc++ files but other libraries I'm using need libc++ and c++11 support.
Also Looking into the brew file from thrift:
ENV.cxx11 if MacOS.version >= :mavericks && ENV.compiler == :clang
I also tried setting Xcode Architecture to 32-bit Intel i386 still no luck
Like many others, I'm taking the CS106B class on iTunes and, although the class is old, I am attempting to use the Stanford C++ libraries that are current. They are found here: http://www.stanford.edu/class/cs106b/.
During the Build Phase of projects, I have inserted into "Link Binary with Libraries" the files "random.h" and "libStanfordCPPlib.a". When I do this, I get the following error messages:
Check dependencies
warning: skipping file '/Users/lewis/Documents/Think Like a Programmer/CS106/VotingSimulation/../../../Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/random.h' (unexpected file type 'sourcecode.c.h' in Frameworks & Libraries build phase)
ld: warning: ignoring file /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a, file was built for archive which is not the architecture being linked (x86_64): /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a
Undefined symbols for architecture x86_64:
"randomChance(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 am using Mac OS X 10.7.5 and XCode 4.6.2. I have set the Build Settings Base SDK to OS X 10.7 for both the Project and the Target.
It appears to me that the "libStanfordCPPlib.a" file may be an archive file that I have to unarchive before I can link the implementation code for the header files. Is this what I need to do, and if so, how do I do it? Am I doing something else wrong in linking the files?
I'm a noob and I'd appreciate help from anyone who has been successful in getting the current Stanford CS106B C++ libraries to work in XCode 4.6.2.
I just ran into this problem myself after upgrading to the newest version of xcode (ver. 5.0, OSX ver. 10.8.5).
Try switching the architecture of the project to 32-bit Intel (i386). The default is "Standard Architectures 64-bit Intel (x86_64)".
I'm currently using xcode 6.4 and trying to work through the cs 106b course work, I had the same issue of not being able to run the sample files and assignment files (can be found here btw http://web.stanford.edu/class/archive/cs/cs106b/cs106b.1136/ ). After changing the Architectures for both the Project and Target to 32-bit-intel as listed above I still received errors. I had to take the additional step of changing the OSX deployment target from 10.10 to 10.8 under the Project info.
This allowed the program to build but I received a notification that i needed to install the Java Runtime Environment, and there was no consult output. Installing this did not resolve the issue. I was only able to fully execute the code after installing the Java Development Kit. I am now able to compile all files for the course.
I hope this update helps more recent attempts to access this info.
I hope you've found an answer to your problem by now, but as I was suffering from a similar problem, trying to get xcode 5.1 to compile Warmup.cpp, I thought I'd post my solution for those others trying to get xcode to work with the cs106b libraries.
After struggling with xcode 5.1.1 and 5.0.2, I downloaded xcode 4.6.3 off of the apple dev site, www.developer.apple.com, and trashed the later versions. After installing 4.6.3, I still got errors, but after switching the Architecures for the Project and for the Target, to "32-bit-Intel", as messysaurus suggests, the warmupp.cpp compiled fine. Trying this same technique with xcode 5.1.1 and 5.0.2 yielded no results.
Hope this helps anyone else running into problems.
I'm getting these feedbacks for two errors I keep getting when I try to "build" (which fails):
(this project built & ran fine before I upgraded my IOS device to 5.1 -- I can't even use the simulator either)
1st error:
"_OBJC_CLASS_$_CLLocationManager", referenced from:
objc-class-ref in BTInclinometerViewController.o
ld: symbol(s) not found for architecture i386
2nd error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What I don't understand is:
-- What does Xcode mean by the term "symbol";
-- How do I go about Identifying and then satisfying the missing symbol;
-- How do I "(use -v to see invocation)"
I'm using a MAC OSX 10.7.3 and Xcode version 4.3.2
Any help would be greatly appreciated on this.
Make sure you include the Core Location framework in your project. Go to you Project, Build Phases, Link Binary with Library. Then add the framework.
If you have, make sure you include the right headers in your class.