For questions concerning the "entry point" of an application or library. The entry point is a special function or location in the code where control is passed from the operating system to the program.
Questions tagged [entry-point]
450 questions
136
votes
12 answers
Is main() really start of a C++ program?
The section $3.6.1/1 from the C++ Standard reads,
A program shall contain a global
function called main, which is the
designated start of the program.
Now consider this code,
int square(int i) { return i*i; }
int user_main()
{
for ( int i = 0…

Nawaz
- 353,942
- 115
- 666
- 851
114
votes
9 answers
Is ‘int main;’ a valid C/C++ program?
I ask because my compiler seems to think so, even though I don’t.
echo 'int main;' | cc -x c - -Wall
echo 'int main;' | c++ -x c++ - -Wall
Clang issues no warning or error with this, and gcc issues only the meek warning: 'main' is usually a function…

Geoff Nixon
- 4,697
- 2
- 28
- 34
82
votes
5 answers
What are the valid signatures for C's main() function?
What really are the valid signatures for main function in C? I know:
int main(int argc, char *argv[])
Are there other valid ones?

Prady
- 10,978
- 39
- 124
- 176
66
votes
6 answers
Replacing the WPF entry point
WPF defines its own Main() method. How should I go about replacing it with my own Main method that (normally) opens the WPF MainWindow (e.g. to add a non-WPF scripting mode via command-line arguments)?

Qwertie
- 16,354
- 20
- 105
- 148
61
votes
1 answer
What happens to entrypoint of Docker parent image when child defines another one?
Let's say I've got the Docker image parent built by this Dockerfile:
FROM ubuntu
ENTRYPOINT ["parent-entry"]
Now I inherit from this parent image in my child image built with this code:
FROM parent
ENTRYPOINT ["child-entry"]
As far as I have…

Harold L. Brown
- 8,423
- 11
- 57
- 109
52
votes
4 answers
getting permission denied in docker run
I am trying using Docker using Dockerfile.
My Dockerfile as follows, where I am using debian linux system.
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
ARG AIRFLOW_VERSION=1.7.1.3
ENV AIRFLOW_HOME /usr/local/airflow
..
..
COPY…

Kush Patel
- 3,685
- 5
- 42
- 65
40
votes
4 answers
How to change entry point of C program with gcc?
How to change the entry point of a C program compiled with gcc ?
Just like in the following code
#include
int entry() //entry is the entry point instead of main
{
return 0;
}

asitm9
- 853
- 4
- 12
- 21
34
votes
7 answers
How to Fix Entry Point Not Found while installing libraries in conda environment
I'm working on Anaconda by making multiple environments in it. I have made an environment camelot and now I want to install different libraries in this environment. So for example to install pandas in this environment,
I'm writing:
conda install…

Usman Ghani Mughal
- 613
- 2
- 7
- 14
32
votes
6 answers
Webpack, multiple entry points Sass and JS
Below is my webpack config. At the moment the file loads this main.js entry point
import './resources/assets/js/app.js';
import './resources/assets/sass/main.scss';
I can get both files in the public/js files but I would like to get the css and js…

LeBlaireau
- 17,133
- 33
- 112
- 192
29
votes
3 answers
Difference between WinMain,main and DllMain in C++
What is the difference between the three functions and when to use them??

Ahmed
- 7,148
- 12
- 57
- 96
27
votes
3 answers
I need an alternative to `Assembly.GetEntryAssembly()` that never returns null
I need to find the assembly in which managed code execution started.
// using System.Reflection;
Assembly entryAssembly = Assembly.GetEntryAssembly();
This seems like the way to go, but the MSDN reference page for Assembly.GetEntryAssembly states…

stakx - no longer contributing
- 83,039
- 20
- 168
- 268
26
votes
1 answer
To write or not to write `module Main where` in Haskell
Haskell 98 specification says that the entry point of a program, namely, function main, should reside in the module called Main, by convention. However, even if you don't write module Main where at the top of the file you write main in, the source…

Pteromys
- 1,441
- 2
- 12
- 29
22
votes
3 answers
How to dynamically add and load entry points?
I am developing a slack bot with plugins using entry points. I want to dynamically add a plugin during runtime.
I have a project with this structure:
+ ~/my_project_dir/
+ my_projects_python_code/
+ plugins/
- plugin1.py
-…

Hebron George
- 329
- 1
- 6
- 21
21
votes
1 answer
React main entry point
I don't understand the structure of most boilerplates out there. I always see 2 files named "index" (one js file and an other html file). I want to understand how the main entry point works. I often see web pack for this job but my main concern is,…

popo63301
- 509
- 1
- 4
- 10
21
votes
13 answers
How can Android source code not have a main method and still run?
I've seen this in a few tutorials now... but how in the world can Android source code not have a main method and still run.
For example (from http://developer.android.com/guide/tutorials/hello-world.html):
public class HelloAndroid extends Activity…

MGoBlue93
- 644
- 2
- 14
- 31