Including 3rd party software makes my program crash with QFileDialog
Hi all!
I am including a 3rd party software called Halcon that handles and treats camera pictures. As I have seen in the example I should include the following lines in the .pro file:
LIBS += -L\"$/opt/halcon/lib/x64-linux2.4-gcc40\"
unix:LIBS += -lhalconcpp -lhalcon -ldl -lpthread
The problem is that as soon as I add the -lhalconcpp and/or the -lhalcon I can use the QFileDialog to search for files... :( it basically crashes everything.
any idea why?
thanks!
Re: Including 3rd party software makes my program crash with QFileDialog
What crashes? The build? The link? The running application? What error messages are produced?
Re: Including 3rd party software makes my program crash with QFileDialog
Run time error, message "segmentation fault", command: QString fileName = QFileDialog::getOpenFileName(this, tr("OpenFile: "),"/home/rrodrigues/Desktop");
The whole application crashes when I call the command above.
Re: Including 3rd party software makes my program crash with QFileDialog
There's nothing obviously wrong with the call. Try a different directory name, or leave it off entirely (that should start the dialog in the directory where the application was started from) and see if that works. If so, the problem is with the particular directory you're trying to access; existence or permissions would be the obvious things to check.
Failing that, turn a debugger loose on it and see if you can pin down the source of the error.
Also, try doing a 'make clean' and a new 'make' before proceeding, just in case.
Re: Including 3rd party software makes my program crash with QFileDialog
just as addicional information I created a new project (with only a button that opens the FileDialog) and if I add the "LIBS" to my pro file it doesn't work, if I take it it works again.
I also tried some variations like take some parameters and try to change others but still no success.