
Originally Posted by
migel
test.h:15: error: multiple definition of `main'
test.h:15: error: multiple definition of `main'
To copy to clipboard, switch view to plain text mode
When building unit tests, QtTest provides its own main function so you should not build the main function of your actual application.
test_conf {
# test specific files and options here
SOURCEs += test.cpp
...
} else {
# app specific files and options here
SOURCEs += main.cpp
...
}
# common stuff here
test_conf {
# test specific files and options here
SOURCEs += test.cpp
...
} else {
# app specific files and options here
SOURCEs += main.cpp
...
}
# common stuff here
To copy to clipboard, switch view to plain text mode
Bookmarks