What do you mean by "compile the software with using other c++ project (inside)" ? Linking to external library ?
What do you mean by "compile the software with using other c++ project (inside)" ? Linking to external library ?
I am tring to compile my Qt program with another C++ program.
Sorry you have to be more precise. Where is this another C++ program ? Inside your project folder ? More details needed.
This sentence can be understood also as "I am trying to compile my Qt program with my own compiler".
I have 2 project one of them is Qt project and the other one is C++ project. Qt project can compile and run without any problem manuelly using Visual Studio Add-In. But I want to compile and run the Qt project with the other C++ project.
for example, using this code inside the C++ project.
system(command.c_str());
So, if I understand what you are saying, you are not trying to compile your Qt program using a plain C++ program, you are trying to run it from the C++ program, is that right?
You have "projectQt.exe" somewhere, and you want your C++ program to do something like this:
Qt Code:
static std::string runQtProgramCommand = "C:\\output\\Deneme\\Qt\\projectQt.exe"; int main( int argc, char * * argv ) { return system( runQtProgramCommand.c_str() ); }To copy to clipboard, switch view to plain text mode
In order for this to work, you need to have the environment for the Qt program configured correctly:
1 - All of the Qt DLLs required by projectQt.exe have to be in the same directory as projectQt.exe (or have to be located in your $PATH environment variable)
2 - If you are using Qt 5.x, then you have to have qwindows.dll in a subdirectory .\platforms under the directory where projectQt.exe lives. See this thread.
3 - Anything else that projectQt.exe depends on also has to be in the projectQt.exe directory or on the $PATH.
Thanks for codes for running. (" system( runQtProgramCommand.c_str() ); ") I found it before you said but I cant find compiling codes. How can I compile my Qt program? Anyone have any idea?
You will need to modify some sort of pre build steps in the Visual Studio.. or add the compiling steps for Qt app as dependencies.
I am not much aware of the Visual studio project files... so if you know, add some pre build step for the Qt app
I dont know it so I need helps....
Bookmarks