Questions tagged [program-entry-point]

Use this tag for questions about entry points to executables (programs); e.g., the "main()" function in most programming languages. If your question is programming language specific, tag that: language as well e.g. C, C++, Java etc.

2997 questions
0
votes
0 answers

How do I ensure I can run a Python module directly via __main__.py and via the -m option?

I have a Python project (an application) with the following project structure (adapted from https://realpython.com/python-application-layouts/#installable-single-package): Helloworld/ ├── helloworld/ │ ├── __init__.py │ ├── __main__.py │ └──…
0
votes
0 answers

Error: Cannot resolve entry file: The `main` field defined in your `package.json` points to a non-existent path

I am getting this error: Error: Cannot resolve entry file: The main field defined in your package.json points to a non-existent path. After upgrading expo 6.0.1
0
votes
1 answer

How should I use Main and static for this block of code?

I have a question regarding these two blocks of code: The first one: class Solution { public int[] twoSum(int[] nums, int target) { int[] result= new int[2]; for (int i=0; i
Azi
  • 15
  • 5
0
votes
7 answers

Start a specific part of an application only one time after installation

On my app I've got a Database which i have to fill one time with some entries. I have packed this step in my splashscreen. Now I got the problem every time i open up my application it puts again all entries to my database. I'm looking for a way to…
safari
  • 7,565
  • 18
  • 56
  • 82
0
votes
1 answer

error: 'int main(int, char**)' previously defined here in C++

I'm implementing gtest now, and it gives me an error : main previously defined here. Here's utest.cpp // Bring in my package's API, which is what I'm testing #include "../src/test.cpp" // Bring in gtest #include // Declare a…
Leanne
  • 667
  • 3
  • 11
  • 23
0
votes
0 answers

Easier way to run a main() method of a class not in Main.java

I'm working on the exercises in "Think Java" Chapter 15 "Conway's Game of Life". I'm a little confused by the way the provided code is set up. The program runs by typing "java Conway.java" in the console and does everything I want including the…
futurebird
  • 73
  • 7
0
votes
1 answer

Launching Android Market Main Page from an application

I'm trying to write a launcher-like application (I'm not planning to release it, it's just for me to use) but I don't seem to find any way to launch the Market. All of the answers I've found actually perform a search on the Market (using a uri…
user964278
  • 13
  • 1
  • 4
0
votes
0 answers

Issue on building flutter apk with flutter_tts dependency

I was building a flutter app in a Windows machine and I stopped working on it for several months, after that I now get issues on running the app. It shows those two errors: FAILURE: Build completed with 2 failures. 1: Task failed with an…
0
votes
0 answers

Have an if statement in main()

I'm new to c# and I have a program that has two forms. (MainForm) which is the main program form and a license form (FrmLicense) which is the license form for the program. The license form needs to display first if the program is in evaluation mode,…
Robert
  • 1
  • 1
0
votes
1 answer

Entry point in Visual C++ 6.0

I am working on a legacy program, the executable is coded in C using just the Windows API, with Visual C++ 6.0. Since all default libraries are removed, I cannot use WinMain() as normal. How can I specify a new entry point, I cannot find the option…
0
votes
0 answers

How to add entry point for file with multiple functions that take args and/or kwargs

How can I set up my entrypoints so that I can access all functions in module1 from the command line as mod1.function_name args kwargs? The module has a script that contains a set of functions, some with args and some with optional kwargs. I would…
a11
  • 3,122
  • 4
  • 27
  • 66
0
votes
0 answers

Main method not found in class Lab2, please define the main method as: public static void main(String[] args)

I'm trying to run this program but I do not know where to put "main". It seems like the program does not have errors but whenever I run it I get error: Error: Main method not found in class Lab2, please define the main method as: public static void…
Daria
  • 9
0
votes
0 answers

I can't access my main when I include the SDL_image.h

This is my code: #include #include #include #include const int WIDTH = 800, HEIGHT = 600; int main( int argc, char *argv[] ) { std::cout << "can't access main\n"; if…
0
votes
0 answers

Netbeans cannot find main files in the project

My NetBeans cannot find any main file in the project. This problem occurs only if the main file is inside some package. But due to project specifics, the main file cannot be on the top of the package tree. I tried all advices which I found (clear…
Ján Яabčan
  • 743
  • 2
  • 10
  • 20