Install a C program to another machine without share code [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 3 years ago.
This post was edited and submitted for review 11 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I need to install a C program UNIX to another UNIX machine, what can I do?
In case the other machine has different architecture how can I share my program in the best way?

The simplest way to share your program is compile it and share the binaries. There are a lot of open question you will have to solve (libraries dependencies, specific distribution configurations, ...). You must to precompile for every targeted hardware architecture (x86-64, ARM, ...) and for every specific SO (BSD, Linux, ... even Windows).
As an example, Gimp is coded in C/C++ and exists binaries for many hardware architectures and operating systems.

Related

How does C access files? [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 11 months ago.
Improve this question
everyone! I'm learning how to access files in C but, I wonder how my program(or C) access files(drive sectors)? I'm searching the Internet for answers but they don't have some proper explanation on how C(or my program), loads drive sectors to memory. Please give me some clarity, and thanks in advance.
C programs use functions of the kernel or a device driver to access hardware. A computing platform (Windows, Linux, OSX, etc) that supports C provides an implementation of the C standard library for programmers. This library contains system specific implementations of functions for accessing files, like fopen. The systems implementation of the standard library is most often just a wrapper around their specific system calls. For example on Windows, the C standard library is going to end up calling these functions: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/

How to find the minimum system requirements needed for the program I wrote in the C language? [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 wrote a program in the C language. Now I want to make the system documentation for that program. And, I would like to state the minimum system requirements that are needed to run my my program.
How do I find out what they are?
Things you can do:
Try running your app on the oldest machines you can find.
Remove a couple memory sticks from your computer
Do you have a define _WIN32_WINNT in your application? If not, the windows SDK you use will define the minimum OS requirement.
You can also try compiling with -D_WIN32_WINNT=xx for an older version to see how far back you can go, based on the Windows API calls you use. windows.h is pretty good at hiding APIs for versions newer than the one you specify with _WIN32_WINNT. Then keep that setting to compile your app to create test and release binaries.
Here's the MS doc on versioning with _WIN32_WINNT: https://msdn.microsoft.com/library/windows/desktop/aa383745
Silly me! I forgot to add that you MUST test on the oldest version you specify in your specs + the one most used by your target users.

What is the difference between drivers and libraries in embedded C [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 7 years ago.
Improve this question
I am wondering what is the difference between drivers and libraries in the embedded C programming. Assuming that I am using uControllers that only have application code/firmware like PICs
With respect to deeply embedded systems (such as the PIC) the distinction is generally that a driver is tied to the hardware and is not portable between platforms, while a regular library should be portable and have no direct hardware dependencies. This is not a hard and fast rule, however it is the most consistent one that I have come across in embedded systems.
It is also common for vendors to call a collection of drivers a library so in a way you can think of drivers as just a special type of hardware dependent library, and a library as simply a collection of related code.

Trimming down freebsd [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am trying to trim down FreeBSD to understand/learn how things work. I have a few questions if someone can help me with that:
1) when we say kernel, can I separate code wise from the rest of the FreeBSD code? What I mean is, I want to know what all files/dirs come under kernel.
2) I know a book called Linux from scratch. Is there any related book for FreeBSD?
Any pointers are most welcome.
Thank you.
FreeBSD is one cohesive system. Whereas Linux is a kernel plus a bunch of packages, all of FreeBSD core is built together (everything but the ports tree). The FreeBSD Handbook is the best resource to start from for learning FreeBSD. There is also a Developer's handbook that can be found on the FreeBSD website. As for what the kernel is in terms of source files, anything under /usr/src/sys is kernel source code. If you want to know about the workings of the kernel, the book "The Design and Implementation of the FreeBSD Operating System" is the definitive guide to the details of the kernel.

Licensing c program [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 7 years ago.
Improve this question
How would i licence my c command line program, e.g limited functionality without a serial number?
Depends what licensing means ...
Write the license text into the source code resp. show the license text when installing or starting the program.
If you want prevent users from copying the program, things get complicated, you might need some hardware dongle.
Or just make it GPL and give the source code away ...
Include a EULA (End User License Agreement) in your program which users will have to accept while installing/using your application. You can get lots of sample EULAs in Internet. Replace the Names appropriately. But remember, you are gonna do things at your own risk. Read the EULA well, modify it to suit your needs.

Resources