Qt and MSVS2010 - Project don't create files - visual-studio-2010

I'm trying create Qt Project in MSVS2010 but VS don't create all files (no Debug and Release files) so I can't build project.
How to fix it?

Related

Generate Visual Studio Project File to build a library with qmake syntax and where to find the project file?

I have an old script to create Visual Studio Project Files to build libraries. The syntax is
cd Kernel
cd core
qmake -t vclib
cd ccMigration
qmake -t vclib
cd ..
and so on for all of the different directories.
I understand why we use qmake and vclib, but what I am not sure is what is the use of -t in this line:
qmake -t vclib
Looking at this : http://doc.qt.io/archives/qt-5.5/qmake-platform-notes.html it says:
Creating Visual Studio Project Files This section describes how to
import an existing qmake project into Visual Studio. qmake is able to
take a project file and create a Visual Studio project that contains
all the necessary information required by the development environment.
This is achieved by setting the qmake project template to either vcapp
(for application projects) or vclib (for library projects).
This can also be set using a command line option, for example:
qmake -tp vc
Why do they use -tp and is the old script syntax correct by using -t?
After I run the script it takes about 1/2 seconds and where can I find the project files for Visual Studio?
Finally, When I open the project files how can I build a library using Visual Studio? Can someone point me to a place where I can read some material?
Thank you for all the help!
Edit: I ran the script and it created .vcproj files in the directories that qmake was run. Example: In folder Kernel -> core it created ccCore.vcproj project file. When I open the file in Visual Studio 2017 it wanted me to perform a One-way upgrade that will automatically make functional changes to the project in order to open it. Is this okay?

Visual Studio Can't debug CMake project - fails with "Unable to start program..."

When I create a project using Cmake, Visual Studio is unable to debug the application. It fails with the error:
Unable to start program '....PATHTOPROGRAM' Access is denied.
The project seems to build ok, just can't debug.
Projects created just with VS are fine
From my experience, CMake doesn't setup Debugging section of the generated project. I always had to do this manually. Fortunately, it is not that hard:
Choose any project you like, ALL_BUILD, for instance;
Open Properties -> Deugging;
Set Debug Target to the executable you want to debug from you build dir.
Even better, Visual Studio somehow keeps these settings even after CMake regenerate project files.

OpenCV 3.0 missing Libraries

I am trying to install OpenCV 3.0 Aplha. I'm following these instructions
http://docs.opencv.org/trunk/doc/tutorials/introduction/windows_install/windows_install.html
After I download and extract the package, I am supposed to have all the pre-built libraries in the folder :opencv\build\x86\vc12\lib but I don't see them in this folder. This folder only has opencv_ts300.lib and opencv_world300.lib. All the other libraries seems to be missing. Also the bin folder doesn't have the dlls. But statlib folder does seems to have all the static libraries.
I also tried to build the libraries from source, and as per the instructions after building the OpeCVALL.sln in visual studio, I am supposed to have the libraries in the x86\vc12 but the libraries doesn't seem to be building in this folder. After digging through the folders I see that the opencv libraries are found in bin/debug and bin/release folders. I thought I would use these for linking in visual studio but I am not finding the header files in build/include folder
I don't see any of these issues with Opencv 2.49. Any help in debugging this issue with 3.0 would be highly appreciated.
Summary: After I build from source/ or pre-built package, I am able to run the sample applications. But I am not finding the headers and libraries to create a visual studio project from scratch.
Okay I figured out what is going wrong here...
Build INSTALL project manually from the OpenCV.sln by right clicking - > build. This will create the libraries in build/install/x86/vc12 folder. This is where lib,bin and staticlib folders are now residing. Also the include files are in build/install/include.
Library files : located in your cmake folder's lib/debug(or release) folder
DLL files : located in cmake folder's bin/debug(or release) folder
Header files : located in opencv3's build/include folder

How to debug cmake target after install

I have a cross-platform project which uses cmake in order to generate Visual Studio solution files. The project has external dependencies (.dlls, resources etc) and the only place where the executable can be run is the installation directory. In that directory I have access all the resources, plugins, translations etc. I can install the project both in debug or release in that directory.
How can I debug a project in the installed location?
There are two problems with this case:
Sometimes I may debug the main application (Main.exe) (a target in cmake project)
Sometimes I may debug some plugins that Main.exe loads when started (I have a different cmake project for the plugins)
Is there a clean way of doing this in Visual C++ without actually create some custom project that is configured to start each time the Main.exe from the installed location? ("C:\Program Files\MainProject\Main.exe" )
Thank you,
Iulian
I managed to do it by 'configuring' with cmake a .user file for the specified project.
The only thing that the user needs to do is to use a template like in this bitbucket project.
In the project you can find a template file.
The cmake script command needed is:
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/scripts/windows/VS201x_Template.vcxproj.user.in"
"${PROJECT_BINARY_DIR}/INSTALL.vcxproj.user"
)
If you need a custom .user file you can always do it manually by saving the generated Visual Studio and creating a template from it similarly to the above example.

How to create a project in VS2010 by using cocos2d-x 2.1.4

I'm learning cocos2d-x and I want to create a project in VS, but I find that there is no template for VS, the version of cocos2d-x is 2.1.4. So I wonder what can I do to build a cocos2d-x project in VS2010 support both Lua and box2d
Many thanks :)
Install python 2.6
Open a command line window
Go to your cocos2d-x-2.1.4\tools\project-creator folder
Run create_project.py. Usage:
create_project.py -project YourProjectName -package com.example.PakcageName -language cpp
Your project will be created in cocos2d-x-2.1.4\projects
If you follow the solution #Chen provided, I believe there is build-in box2d support. And you can add lua support following this step.
1.add "scripting/lua/proj.win32" project to your solution in visual studio.
2.right click solution, and add "liblua" rely to your project.
rebuild your project. And add
#include <CCLuaEngine.h>

Resources