Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 error messages when compiling in QT #2

Closed
ShovelHand opened this issue Sep 15, 2015 · 5 comments
Closed

5 error messages when compiling in QT #2

ShovelHand opened this issue Sep 15, 2015 · 5 comments

Comments

@ShovelHand
Copy link

I am running windows and have tried Visual Studio and QT Creator. Visual Studio worked great, but QT gave me a few warnings about only initializing non-static members with c++11, and the five following errors.:
main.cpp:-1: error: undefined reference to cv::Mat::operator=(cv::Scalar_<double> const&)' main.cpp:-1: error: undefined reference tocv::fastFree(void*)'
👎 error: CMakeFiles\raytrace.dir/objects.a(main.cpp.obj): bad reloc address 0x2d in section `.text$_ZN2cv3MatD1Ev[__ZN2cv3MatD1Ev]'
👎 error: final link failed: Invalid operation
collect2.exe:-1: error: error: ld returned 1 exit status
I am using QT 3.5.0 based on QT 5.5.0 and using MSVC 2013, 32 bit as my compiler. Not sure what I'm doing wrong, or if this problem is unique to me. I wouldn't sweat it since it worked for Visual Studio, but I'd love to be able to use QT's helpful widget design stuff in the future.
*edit: it does look like the link you provided for the installer is a different one than I used. I'll try installing the one you linked to and see if that works better,

@marovira
Copy link

@ShovelHand
I cannot reproduce the error on my machine using your current setup (Qt Creator 3.5.0 based on Qt 5.5.0 and MSVC 2013). When you first opened the CMakeLists file in Qt Creator, did you use the NMake generator? Or something else? Also, what version of Windows are you using?

@ShovelHand
Copy link
Author

I believe I used CMake following QT's prompting, but I may be mistaken. I am using windows 10. Tomorrow I will see if I can reproduce the problem. It's probably some silly thing I've done wrong on my end.

@luckysama
Copy link
Collaborator

Hi @ShovelHand ,

We have office hours from 11am - noon tomorrow.
Please bring your laptop with you to the lab (ECS330) if you have time.

I am personally strongly against you using the Qt library. Please restrict your code to purely OpenGL+OpenCV if possible, Qt is very unstable, and its backward compatibility is terrible (e.g., if Qt updates then nothing works) If you are determined to write a GUI on windows, just use Microsoft libraries, such as WPF.

The reason we use Qt Creator is only because it's a cross-platform GUI, and it saves all the effort of communicating with CMAKE on the command line.

@ShovelHand
Copy link
Author

Hi, Lucky.
My ray tracing project is going swimmingly, and I'm going to stay home to
press the advantage while my wife is also here to look after our son.
You've convinced me that QT is for suckers.

On Wed, Sep 16, 2015 at 5:28 PM, luckysama notifications@github.com wrote:

Hi @ShovelHand https://github.com/ShovelHand ,

We have office hours from 11am - noon tomorrow.
Please bring your laptop with you to the lab (ECS330) if you have time.

I am personally strongly against you using the Qt library. Please
restrict your code to purely OpenGL+OpenCV if possible, Qt is very
unstable, and its backward compatibility is terrible (e.g., if Qt updates
then nothing works) If you are determined to write a GUI on windows, just
use Microsoft libraries, such as WPF.

The reason we use Qt Creator is only because it's a cross-platform GUI,
and it saves all the effort of communication with CMAKE on command line.


Reply to this email directly or view it on GitHub
#2 (comment).

@taiya
Copy link
Owner

taiya commented Sep 17, 2015

Hi Alex, I am glad to hear that. I strongly agree with Lucky. Qt is only really necessary for larger applications (e.g. a large UI interface). It introduces a lot of complexity and overhead which is unnecessary for this course!

@taiya taiya closed this as completed Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants