create Qt project on windows operating system - windows

i to create a QT project under windows operating system but when i try to run this application i found this error:
Starting C:\Source\test1\debug\test.exe...
The process could not be started!
can any one help me to know what is the problem

It sounds like you're trying to invoke this from an I.D.E. (like QT Creator) that can't find the executable.
Assuming it has been compiled, the I.D.E. may be trying to call it from the wrong directory.
Look in C:\Source\test1\debug and see if that executable exists.
If it's not there, it probably should be looking in C:\Source\test1\release.
Look there for the executable.
For QT Creator: I've found in the past that deleting the *.pro.user file and reopening the project works. The I.D.E. will ask/(force?) you to regenerate this file. Do so. This seems to fix many problems like this.
If you are using an I.D.E. as mentioned, it seems that your project configuration is broken. Save all source files and start a new project with the source files, and let the I.D.E. regenerate its scripts. Check the makefile for errors.

Related

Xcode 13 and Linux Makefile

I searched and it seems all the answers are from are from many years ago. I'm working on a command line tool for linux/Mac that currently uses a Makefile. I wanted to use the Xcode debugger, so I tried to build an Xcode project, but I'm having some final difficulties.
I created a new project of type command line tool with external build target in the project directory. The default was to use /usr/bin/make. It ended up in a subdirectory, and based on several older web resources, I moved the project file up to the folder with the makefile. I added the source files in the folder to the project and right now I can edit and build from Xcode without difficulty.
The issue is that the final executable ends up in a subfolder called bin, and I can't seem to discover how to tell Xcode that that is the final executable. All of the resources I've found talk about adding a custom executable to the target from the project menu, but that menu no longer exists. Searching project help doesn't seem to point to any setting for the executable produced by an external build process. The closest build setting I could find was PROJECT_NAME, but changing that didn't seem to help.
Thanks.
Found an answer on another site. Edit the info tab in the scheme to identify the binary.

How do I make a GitHub repository into an exe?

I am new into software developing. I have found this GitHub repository which I plan to modify. Let's just say I fork this repository and modify it. How would I then be able to export it from there. By export it I meant turn all of those files into one windows executable file. Thanks.
In general, building a project is a project-specific task unless the project is written in a language (such as Rust) that has a built-in build tool. If you're unclear about the steps to build a project, you should look in the documentation or the wiki for steps about how to do so, and failing that open an issue asking them to document the procedure for building the project.
Just looking at the project, it does not seem obvious that it should produce a binary executable of any sort since it's written mostly in JavaScript.
Usually you use a compiler to turn source code into machine code (exe files).
As bk2204 mentioned, this project is based on Javascript and Node.js.
Javascript is interpreted instead of compiled, so another program (Node.js) reads the source code and executes it directly every time instead of first compiling it into an exe file. That other program itself may be in an exe file.
The project you have linked is a fork of this project, and that one seems to have a Windows launcher/installer exe file (that probably installs or contains Node.js, but I haven't checked).
That installer is available here in both exe and source code form. So you could modify the launcher and rebuild it, but the main app is not in the launcher, instead it's in all the JS files. You may be able to edit the JS files and just use the same launcher without modifying it. There may be a packaging step required after editing the JS files, to package them into a form that the launcher expects. You would need to run this build step after every time you modify the JS files, to provide the new code to the launcher.
You would have to explore the project's structure and build process to find out the exact steps.
If you're very new that may be exceedingly difficult.
You may want to practice by learning Javascript and Node.js.
You could after that try Java which is compiled, and possibly more powerful than Javascript. Just for fun.
Maybe you could do 30 of these practice projects, then you'll have a chance of being able to modify this project successfully.

Generate an xcodeproj

I know this might sound a bit strange but I'd need to generate a xcodeproj automatically.
Basically scanning the filesystem and adding certain files to the project and to a specific target.
The main reason behind this, is that I work in an zero IDE environment. Thus, we have our own build system and source files are added and removed all the time.
I could use "create folder references for any added folders". However, xcode won't ever parse source files if they aren't part of any target. So, no symbols, no code completion...
To me, my only option would be to "auto-update" my xcodeproj with a script...
Thanks in advance for your inputs!
Cmake is one option (see this related question) and there's also Scons which I think can generate Xcode projects. There's also Qt's qmake which can generate the project files, but this is probably overkill unless you're using full Qt.
You can either user AppleScript (or anything OSA-compatible) to automate the process of creating the project in Xcode itself, or you could look at CMake, which is able to generate Xcode project files.

Automatically compile any Java class when the file is dropped in a directory

I look at a lot of small Java programs. It would be convenient if I could set up a directory (or directory structure) on my Mac where any time I add a .java file, javac automatically runs and attempts to compile that file. I've briefly looked into Automator actions, but found nothing that fits the bill. Then I got to thinking: on my PC, I would use the .Net FileSystemWatcher class and write the code myself. But before I try that on my Mac with Mono, I want to ask the community for other ideas. Any advice is appreciated. Thanks.
In JDK6 you can programmatically compile, so you could write your own program to do this, which may be slightly better than doing it in mono.
So you would just have a program that is always running, it looks for either any new files or a file that has been changed since the last check and then just compiles them, and you may want it to pass information to a dashboard window when there are errors, and perhaps some status info so you know it is working.
http://binkley.blogspot.com/2005/09/programmatically-compiling-java-in-jdk.html
If you have all the .java files available at the start, you could write a shell script to compile them all in one run -- in different directories if you need to.
If you explained why you would want this, maybe I/we could be more helpful.

Which Qt DLL's should I copy to make my program stand-alone?

I'm trying to make a distribution directory with my application. I've copied several Qt DLLs to that directory, and the program seems to be working, with one exception: it doesn't seem to find SQL plugin for SQLite. Copying qtsqlite.dll to the directory, doesn't allow my application to open or create SQLite files. What must be the direcotry structure or which additional files need to be copied so that the program can read the database?
you can use depends.exe to see exactly what the dependencies of your exe are and make sure they're all included.
Also, read this page about qt plugins. they are supposed to be in a specific directory called "plugins" and not in the main directory with all the other dlls.
Most probably, the qtsqlite.dll itself depends on original SQLite DLL's which you probably need to copy as well.
Don't forget to include an LGP license copy in your distribution as well as pointers to the original download ressources of the libs you include and their sources. To stay with the law :-)
Thanks to the link #shoosh provided, I was able to fix the problem. I needed to create sqldrivers subdirectory in the distribution dir with qsqlite.dll library inside. But that was just step one. Do you have any tips and resources on creating a full-blown Windows installer? I'm mainly a Linux programmer so this area is unknown to me.

Resources