Questions tagged [entry-point]

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.

450 questions
20
votes
3 answers

Can a C# .dll assembly contain an entry point?

My goal is to create an executable that will start a shadow copied application. The trick is, I want this starter program to have no external dependencies and not have to contain any knowledge about the program it has to start. I also want it to be…
Sean
  • 533
  • 1
  • 5
  • 6
19
votes
4 answers

What was Wrong with void main()?

Why has setting the entry point's return type to void in C++ always been discouraged, and was later removed by the standard and is prohibited by modern compilers? Why is it considered bad practice? Now, as I understand C# and Java both allow the…
ApprenticeHacker
  • 21,351
  • 27
  • 103
  • 153
18
votes
2 answers

GDB Cannot insert breakpoint, Cannot access memory at address XXX?

I wrote a really simple program: ebrahim@ebrahim:~/test$ cat main.c int main() { int i = 0; return i; } And the I compiled it with -s for stripped mode: ebrahim@ebrahim:~/test$ gcc -s main.c -o f3 ebrahim@ebrahim:~/test$ file f3 f3: ELF…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
18
votes
2 answers

Multiple Entry Points in GWT

I'm getting into Google Web Toolkit, and am a little confused about the Entry Points in GWT. Google's docs say: If you have multiple EntryPoints (the interface that defines onModuleLoad()) within a module, they will all be called in sequence as…
Adam
  • 1,076
  • 1
  • 11
  • 24
18
votes
2 answers

module not found during load_entry_point in Python

I'm trying to create an entry point for the main method in one of my python modules, and there seems to be trouble importing the module where that function lives. My setup.py looks like this: ... setup(name="awesome-tool", ..., …
llovett
  • 1,449
  • 1
  • 12
  • 21
17
votes
7 answers

Avoiding the main (entry point) in a C program

Is it possible to avoid the entry point (main) in a C program. In the below code, is it possible to invoke the func() call without calling via main() in the below program ? If Yes, how to do it and when would it be required and why is such a…
17
votes
6 answers

VB.Net 'Sub Main' was not found

ok, I have an A level computing exam on Monday, and I have been working on the pre-release skeleton code. This morning when I tried I got an error saying 'Sub Main' was not found. There clearly is a Sub Main() in the code which I will paste in…
Ed Prince
  • 714
  • 2
  • 14
  • 31
17
votes
6 answers

GWT Compile "Add an entry point module" dialog

Can anyone explain where the Eclipse GWT plugin defines it's entry points? In an attempt to get my old GWT project working again with GWT 2.0, I created a default GWT 2.0 project in Eclipse and was able to run it successfully. It's the one that asks…
Alex Worden
  • 3,374
  • 6
  • 34
  • 34
17
votes
3 answers

What functions does _WinMainCRTStartup perform?

This is part of a series of at least two closely related, but distinct questions. I hope I'm doing the right thing by asking them separately. I'm trying to get my Visual C++ 2008 app to work without the C Runtime Library. It's a Win32 GUI app…
Thomas
  • 174,939
  • 50
  • 355
  • 478
16
votes
10 answers

"does not contain a static 'main' method suitable for an entry point"

I can't figure what's my wrong with my code below. When I try to compile I get the message: does not contain a static 'main' method suitable for an entry point. This is my code: using System; using System.Collections.Generic; using…
user2483549
  • 161
  • 1
  • 1
  • 3
15
votes
1 answer

How to execute the Entrypoint of a Docker images at each "exec" command?

After trying to test Dockerfiles with Dockerspec, I finally had an issue I can't resolve properly. The problem is, I think, from Docker itself ; If I understand its process, an Entrypoint is only executed at run, but if the container stay started…
Doubidou
  • 1,573
  • 3
  • 18
  • 35
15
votes
11 answers

is there a GCC compiler/linker option to change the name of main?

My software has one main for normal use and a different one for unit tests. I would just love it if there was an option to gcc to specify which "main" function to use.
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
14
votes
1 answer

What is the built-in `#[main]` attribute?

I have been using the #[tokio::main] macro in one of my programs. After importing main and using it unqualified, I encountered an unexpected error. use tokio::main; #[main] async fn main() {} error[E0659]: `main` is ambiguous --> src/main.rs:3:3 …
user18102576
14
votes
3 answers

How to set argparse arguments from python script

I have a main function specified as entry point in my package's setup.py which uses the argparse package in order to pass command line arguments (see discussion here): # file with main routine specified as entry point in setup.py import argparse def…
XabiFermal
  • 153
  • 1
  • 1
  • 7
12
votes
2 answers

Call "main" function programmatically in Windows

I have a third-party console application. I need run it from my application but I cannot run it as a separate process (because I need to work with its dependencies: fill Import tables manually, setup hooks etc.). So probably I should call main…
1
2
3
29 30