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
5
votes
2 answers

How to define entry points with Pipenv?

setup.py used to define entry points like this: entry_points={ 'console_scripts': [ 'cursive = cursive.tools.cmd:cursive_command', ], }, How to do it for pipenv? There seems to be no canonical way to defined an entry point with…
kolypto
  • 31,774
  • 17
  • 105
  • 99
5
votes
2 answers

Can I do `ret` instruction from code at _start in MacOS? Linux?

I am wondering if it is legal to return with ret from a program's entry point. Example with NASM: section .text global _start _start: ret ; Linux: nasm -f elf64 foo.asm -o foo.o && ld foo.o ; OS X: nasm -f macho64 foo.asm -o foo.o && ld foo.o -lc…
Bilow
  • 2,194
  • 1
  • 19
  • 34
5
votes
1 answer

arm-none-eabi-gcc with Cmake has not entry point with flag -nostdlib

I'm trying to make a hello world in arm architecture using CMake with this toolchain My main.c int main() { char *str = "Hello World"; return 0; } And my CMakeLists.txt cmake_minimum_required(VERSION 3.4) SET(PROJ_NAME…
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
5
votes
2 answers

Conditional setuptools entry_points

Is it possible to have conditional entry_points defined in setup.py? I noticed that it is possible to tag an entry point using extras, but that entry point will be available even if the package is installed without that extra…
Torkel
  • 138
  • 10
5
votes
3 answers

What is the earliest entrypoint that the CLR calls before calling any method in an assembly?

In the past years I've occasionally been wondering what equivalent of the (in)famous DLL_PROCESS_ATTACH was available in the .NET world. Any documentation I have says, slightly simplified, that the earliest entry point to a class is the static…
Abel
  • 56,041
  • 24
  • 146
  • 247
5
votes
5 answers

what is the Python equivalent of the Main method in Java, C, C++ & C#?

new to Python, coming from Java (& Android) & C,C++,C# background. Looking for similarities basically. What's the Entry point of a python project? like the Main method in other languages. A project with multiple .py scripts, how do I set an entry…
Mujtaba Nowshad
  • 139
  • 1
  • 7
5
votes
2 answers

Cronjobs per package

Up to now, we manage the crontabs of our servers by hand. I have seen this: http://django-extensions.readthedocs.org/en/latest/jobs_scheduling.html It is a nice django app, since you just need to edit your crontab once. You enter lines like this…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
1 answer

Do dynamic linked libraries(.dll,.so etc) have an entry point?

Today I was in a discussion involving that libraries dont have an entry point.Generally the executable loads the libraries and the entry point is the main in the executable itself. Are there execeptions wherein the libraries themselves can have an…
sp497
  • 2,363
  • 7
  • 25
  • 43
5
votes
1 answer

How Do I Get The Names Of All The Entry Points In user32.dll?

I am experimenting around with rundll32.exe and user32.dll. For example, to lock my workstation I type: rundll32.exe user32.dll, LockWorkStation I would like to try other commands (entry points) in user32.dll but I don't know what they are. Is…
Jan Tacci
  • 3,131
  • 16
  • 63
  • 83
4
votes
1 answer

Set custom EntryPoint for a simple application

I have this simple hello world c++ application: #include #include using namespace std; void test() { cout << "Hello world" << endl; } I want to use test as my custom entry point. So far I tried to set Linker -> Advanced…
0_o
  • 570
  • 6
  • 18
4
votes
2 answers

Python Setuptools: quick way to add scripts without "main" function as "console_scripts" entry points

My request seems unorthodox, but I would like to quickly package an old repository, consisting mostly of python executable scripts. The problem is that those scripts were not designed as modules, so some of them execute code directly at the module…
PlasmaBinturong
  • 2,122
  • 20
  • 24
4
votes
0 answers

Python, how to set environment variable for setuptools "entry_points", or use "scripts"?

My company is in the process of updating our legacy Python 2.x scripts to Python 3, and we're running into some speed bumps while trying to be properly Pythonic in our update process. When using setuptools to create a console_scripts entry point,…
Legomaniac
  • 61
  • 4
4
votes
2 answers

Where are WPRFLAG and _WINMAIN_ macros defined?

You know, there are codes like #ifdef WPRFLAG and #ifdef _WINMAIN_ in ctrexe.c . I'm using vs2010) These macros determine what function is called from entry point. But I can't find these macros even in the macro settings of project setting. Where…
ssss
  • 41
  • 1
  • 4
4
votes
1 answer

Docker Standard_init_linux.go:207: exec user process caused “no such file or directory”

My Dockerfile looks like: FROM ubuntu:18.04 RUN apt-get ... ... COPY app /bin And my executable app is just bash script: make -f /app/makefile $@ When I try to run docker run -v "`pwd`:/project" -it --rm my_image app I get the following…
Nick Roz
  • 3,918
  • 2
  • 36
  • 57
4
votes
1 answer

Is there a difference between Main() in a structure versus a class?

Let's say in C# I had my Main() function in an Entry class that exists solely to house the entry-point. I would do it like such: public class Entry { public static void Main() { ... } } I consider this pretty typical, and at…
JSON Brody
  • 736
  • 1
  • 4
  • 23