Cannot initialize a parameter of type 'const char *' with an rvalue of type 'int' in Auto Test project
Moved
Unsolved
General and Desktop
-
wrote on 1 Aug 2022, 09:49 last edited by Deyan 8 Aug 2022, 04:44
I am trying to create Auto Test Project, but I have got this error: "Cannot initialize a parameter of type 'const char *' with an rvalue of type 'int' " from QTEST_MAIN macro. Can you help me?
-
I am trying to create Auto Test Project, but I have got this error: "Cannot initialize a parameter of type 'const char *' with an rvalue of type 'int' " from QTEST_MAIN macro. Can you help me?
@Deyan from my experience with QtTest, you're supposed to do this one of two ways
(The presumably preferred one)
- Compile your project as a static library and include/link against that in your test projects
("quick" and dirty)
- Add the specific files you want to test - containing your classes/functions - to your test project, full or relative path. This is needed for the compiler to create obj files and link correctly
1/2