Editing this Qt program (C++) I think [closed] - c++

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am working on a raspberry pi project that I have picked up from a previous groups work.
It seems that the program used to control the raspberry pi has been compiled and we can run it fine, however there is no original source code (C++) or any project files for Qt as far as I can see, below is a copy of the folder, is there any way to get at the source code using Qt or something else?
We want to be able to make changes to the program.
There is no documentation on the build of the software, only indication on how to run it which we can do fine, I am trying to track down the authors but to no luck.
What can I try? I tried opening the files here with http://codelite.org/.
All of the object files and the turbo_gui file just contain one line: ELF SOH SOH SOH

On the image you posted, the directory is a Qt build directory, not a source directory.
The folder you showed contains some source files automatically generated by Qt, some compiled .o files and a linked binary, but not the original source code.
If the authors didn't publish the original C++ source code, there is no way to get the exact source code back. You should ask the authors to send you a copy of the source code.
If there is no way to get the source code, the best you can do is use a disassembler or decompiler (such as Hex-Ray's plugin for IDA) to get an idea of how the code works, then reimplement it yourself.

Related

How to compile C++ codes in Linux with source files hidden? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
Is there anyway to compile C++ source files in Linux and make these files unreadable to users? Either have the files encrypted or read them into memory is acceptable.
We are developing a Linux based software and we don't want our users to have direct access to our source code files.
Once a binary is created from C++ source files, the original source files are not needed in order to run the program. You can distribute only the compiled program.
Just build a container image with your software and its dependencies and run it anywhere. No need to distribute sources or compile for specific distributions.
You can use Flatpak or Docker, for example.

How to check the dll files required by my c++ file [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I use Visual Studio 2017 Community for C++ coding. I have made a simple win32 console app and do not want to expose my code. I have also found the .exe file in the debug folder of the solution. When I try copying the .exe file in the Debug folder in another folder it says that the dll isn't found.I also tried copying the whole folder but the same error occurs. Please help me...I want to run my app on another computer also.
You can Generate Code Map for Solution.
Navigate to Architecture –> “Generate Code Map for Solution”
Generates a code map like:
Which shows the inter-dependency between modules and libraries.
In your case by just copying the exe, you are breaking the references to all of the required libraries. Depending on your scenario, you have two good options. Copy the entire source tree + dependencies for you project and recompile it in the new working directory or create an installer which will allow you to distribute dlls and any other required resources.
This is more complicated that one might hope. To answer the question in the title, you need Dependency Walker. (The web site doesn't mention Windows 10, but this stuff hasn't changed much recently, so don't worry about that.)
To distribute the program to another machine, you need to create a release build (the debug run-time libraries are not redistributable). Once you have done that, you will almost certainly find that the other machine already has the release run-time library, but you will need to copy other libraries.

How to compile code from other compilers in VS 2017 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have downloaded a source code and can't get my head around to how can I compile it/open it in VS 2017. It should have been straight forward but nothing worked until you create a new project. If I just open a C file in VS, it just show me the file and there's no way to run it. Imagine I wrote a simple Hello World in C and I have its C file. How could I open and run it in VS? The only way I found was to create a new project and copy/paste the code from my C file into the newly generated file by VS. This gets extremely inefficient with large projects having multiple C/h files :/
Yes, you should Create a New project -> Visual C++ -> Empty Project. After that, you will see in the solution explorer (Resource files, Header files, and Source files) folders. Right click on Header files and Then Add -> Add existing items, Then you can select multiple header files. Follow for source files same as header files that you Added

How to extract files from C++ program and then run one from them [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm writing updater program in C++, i need extract files from them.
I'm using Microsoft Visual Studio.
What I'd like the achieve:
User runs exe
exe unpacks files
exe runs one of extracted files
Can anyone recommend a good solution?
Thanks!
Extracting resources from a file with C++:
Extract file from resource in Windows module
Self-Extracting Executable C++
http://www.codeproject.com/Articles/4221/Adding-and-extracting-binary-resources
You're writing an updater.
User runs exe
exe unpacks files
exe runs one of extracted files
So your program should:
Download the patch from the server (use a networking library like winsock or something higher-level)
Unzip the archive (depending on the format in question, there should be libraries for that, like zlib)
Move the new files and overwrite the old ones (use win32 or something higher-level like MFC or Qt)

What is meant by building a library? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I downloaded an open source library. It asked me to execute this file called "do" with the command ./do. Then it kept building the library for about 10 min. What is building a library exactly?
Building means compiling the source code to an executable format. A library is a term used to define reusable components.
For example, if you want to do some date conversion operations like dd/mm/yyyy format to mm/dd/yyyy, you can either write your own code or you can use re usable code which is already written by someone. Those reusable codes can be released to the public in many license forms; one of them is open source.
If the code is open source, the source code will be available for anyone to download. Sometimes the compiled version of the source code will also be there. Instructions will also be provided how to compile ( in other words , "build" ) the source code to an executable format which can be used in your code and that's what it means by "building" a library.
For an example, see the Joda-Time Java library.
Building is the process which encompasses source generation (for YACC, Qt MOC etc.), compilation of source code and linking of resulting object files. In brief: it's the sequence of operations that turn human readable source code into a machine-readable binary library.
Pro tip: read the description of the tag build under your question.