Hey gang,
I've got a brand new laptop with Xcode 11, QT Creator 4.10.1 Based on QT 5.13.1 and OSX SDK 5.12.4 compiling with c++ 11
Author Topic: Undefined symbols for architecture x8664 on travis build for macos (Read 118 times).
- This is a legal attribute on MacOS, but is ignored on Linux. I'd like to second mecej4's request for the compile and link commands.
- I am trying to compile a very simple code with g (MacPorts gcc8 8.3.00) 8.3.0. I installed opencv4.1.02 with homebrew and it works perfectly for python.
- 'vtable for cv::VideoCapture', referenced from: main in cclEoKKu.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.ld: symbol(s) not found for architecture x8664collect2: ld returned 1 exit status.
- Hey gang, I've got a brand new laptop with Xcode 11, QT Creator 4.10.1 Based on QT 5.13.1 and OSX SDK 5.12.4 compiling with c 11 I'm attempting to simply create a new project, and add a keyPressEvent. It's failing right away. Here's my entire.h file.
I'm attempting to simply create a new project, and add a keyPressEvent. It's failing right away.
Here's my entire .h file:
From project creation, I added these lines:
#include <QKeyEvent>
and
protected:
void keyPressEvent( QKeyEvent *e );
void keyPressEvent( QKeyEvent *e );
That's it.
![Macos Caffe Undefined Symbols For Architecture X86_64 Cv Imencode Macos Caffe Undefined Symbols For Architecture X86_64 Cv Imencode](/uploads/1/2/6/6/126617482/371666913.jpg)
Here's my entire .cpp (unchanged from project creation):
Here's the error I get:
Undefined symbols for architecture x86_64:
'MainWindow::keyPressEvent(QKeyEvent*)', referenced from:
vtable for MainWindow in moc_mainwindow.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: *** [ScrollingText3.app/Contents/MacOS/ScrollingText3] Error 1
12:01:04: The process '/usr/bin/make' exited with code 2.
Error while building/deploying project ScrollingText3 (kit: Desktop Qt 5.12.4 clang 64bit)
When executing step 'Make'
'MainWindow::keyPressEvent(QKeyEvent*)', referenced from:
vtable for MainWindow in moc_mainwindow.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: *** [ScrollingText3.app/Contents/MacOS/ScrollingText3] Error 1
12:01:04: The process '/usr/bin/make' exited with code 2.
Error while building/deploying project ScrollingText3 (kit: Desktop Qt 5.12.4 clang 64bit)
When executing step 'Make'
I'm following this example:
https://www.youtube.com/watch?v=44fCm1KlQGY
https://www.youtube.com/watch?v=44fCm1KlQGY
Under General messages, I see this:
'Project WARNING: Qt has only been tested with version 10.14 of the platform SDK, you're using 10.15.
Project WARNING: This is an unsupported configuration. You may experience build issues, and by using
Project WARNING: the 10.15 SDK you are opting in to new features that Qt has not been prepared for.
Project WARNING: Please downgrade the SDK you use to build your app to version 10.14, or configure
Project WARNING: with CONFIG+=sdk_no_version_check when running qmake to silence this warning.'
Project WARNING: This is an unsupported configuration. You may experience build issues, and by using
Project WARNING: the 10.15 SDK you are opting in to new features that Qt has not been prepared for.
Project WARNING: Please downgrade the SDK you use to build your app to version 10.14, or configure
Project WARNING: with CONFIG+=sdk_no_version_check when running qmake to silence this warning.'
Questions:
- What does this mean, and how does one address it?:
Undefined symbols for architecture x86_64: - How does one downgrade from platform SDK 10.15 to 10.14 (I'm attempting to download Xcode 10 to accomplish this)
- Are the two above connected? Am I getting the undefined symbols error because of the SDK version impropriety?
- Is the QKeyEvent still the proper function to use in the latest QT for capturing key presses and calling functions from them?
- How do I correct this?
Hello developers, I want to compile my C++ code in the terminal. But I have some errors looks like that:
Undefined symbols for architecture x86_64: 'cv::Mat::deallocate()', referenced from: cv::Mat::release() in main-9ae616.o 'cv::imread(std::__1::basic_string<char, std::__1::char_traits,=' std::__1::allocator=' >=' const&,=' int)',=' referenced=' from:=' _main=' in=' main-9ae616.o=' 'cv::imshow(std::__1::basic_string<char,=' std::__1::char_traits,=' std::__1::allocator=' >=' const&,=' cv::_inputarray=' const&)',=' referenced=' from:=' _main=' in=' main-9ae616.o=' 'cv::waitkey(int)',=' referenced=' from:=' _main=' in=' main-9ae616.o=' 'cv::fastfree(void*)',=' referenced=' from:=' cv::mat::~mat()=' in=' main-9ae616.o=' ld:=' symbol(s)=' not=' found=' for=' architecture=' x86_64=' clang:=' error:=' linker=' command=' failed=' with=' exit=' code=' 1=' (use=' -v=' to=' see=' invocation)<=' p='>
My command:
Macos Caffe Undefined Symbols For Architecture X86_64 Cv Imencode 7
g++ -std=c++11 -o out main.cpp
How to solve this issue? help me, please?
editretagflag offensiveclosemergedelete