Skip to main content

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.

program-entry-point
Filter by
Sorted by
Tagged with
1 vote
1 answer
42 views

Is it a good practice to import functions from __main__.py?

My __main__.py module for my package is defined like so (simplified): def main(): ... # Start my GUI if __name__ == "__main__": main() It is also a package, with an __init__.py as ...
tomasvana10's user avatar
1 vote
1 answer
44 views

Scala Future strange behavior

What's wrong with this code? Why I can see only one output? What returns futureUserByName function? onComplete doesn't work for it as well. It must be just simple Future, but it doesn't work. import ...
Dmitriy Kolesnik's user avatar
0 votes
1 answer
88 views

In C programming language, can the main function begin with main() instead of int main()? [duplicate]

I'm reading the "C Programming Language, 2nd edition" by Dennis Ritchie and Brian W.Kernighan. On page 38, the main body of the program begins with main() instead of int main(), I believe ...
Greeshma's user avatar
-2 votes
2 answers
36 views

LINK2001,and LINK1120 errors visual studio 2022 CLR empty project

i am currently working on a web browser on visual studio 2022 and every time I execute the program these errors show up LINK2001 unresolved external symbol main and LINK1120 1 unresolved externals. So ...
user25910489's user avatar
27 votes
4 answers
4k views

How is Leetcode able to compile a C++ program without me writing a 'main()' function?

As far as I know, a C++ compiler looks for a function called main() in order to know where the program should start. But when I use the Leetcode site, the expected solution's code has no main function....
Shivani's user avatar
  • 657
1 vote
1 answer
55 views

Where am I initializing my main class twice?

I'm receiving the error Plugin already initialized!. I already know that this means that I'm initializing my main class twice and Bukkit/Spigot doesn't like this. I cannot seem to figure out where I'm ...
quietWind01's user avatar
0 votes
0 answers
23 views

Avoiding MSBuild version with GitHub action

Currently in my github actions i am using " uses: microsoft/setup-msbuild@v1" instead of updating this to newest version i was wondering if it's good idea to use @main insted to avoid ...
Vlad Filippovich's user avatar
0 votes
0 answers
56 views

WinForms - Call method in Threading, which calls method in main thread at the end of it

I've seen examples where the thread started in the WinForms class, using Threading.Start(), only calls a helper method defined in that class. Is it possible to use Threading to first invoke a method ...
josephwj's user avatar
0 votes
1 answer
111 views

In IntelliJ(2024.1.1) with the Scala Plugin(2024.1.20), Main.main is Failing with "Could not find or load main class org.public_domain.main"

UPDATE: Nestled deep within the large accepted answer is the way to fix this; i.e. rename the method from main to something else, or rename the object Main to something else. The conflict is a case ...
chaotic3quilibrium's user avatar
0 votes
1 answer
72 views

Compatible types for the main function

From ISO/IEC 9899:2024, 5.1.2.3.2, Program startup: The function called at program startup is named main. The implementation declares no prototype for this function. It shall be defined with a return ...
Harith's user avatar
  • 7,210
0 votes
0 answers
21 views

smina.exe Entry Point Not Found

I met an error when I tried to use Smina for docking. I installed Smina used order: conda install conda-forge::smina But it occurs this error when I run Smina: The Procedure entry point ?sync_flush@...
Ericatong's user avatar
0 votes
2 answers
22 views

Android - can i add EditText value to the android:text row of a TextView in activity_main and have it concatenate?

<EditText android:id="@+id/et_name" android:layout_width="match_parent" android:layout_height="48dp" android:layout_margin="20dp" android:...
getoffmylap's user avatar
1 vote
0 answers
98 views

Method 'main()' does not have signature 'public static void main(String[])'. The program cannot be started while main has this problem

When trying to complete a task ("Create a Dog class containing two String type fields: name and says. In the method main() create two Dog objects with different names (spot and scruffy) and ...
Nik's user avatar
  • 11
0 votes
1 answer
380 views

dotnet new console --use-program-main does not work

when you are in VS Code you start a new console, the program code generated has the new format where there is no main() section as in the old days. I like have the main() section. I should be able ...
jozef's user avatar
  • 101
2 votes
3 answers
45 views

Slot Game in Py

I am building a very basic slot machine in python. This is the first python code I am doing, and am following a ytb tutorial. Somehow I am not getting the right result in terminal when I am testing ...
Nelly's user avatar
  • 21
0 votes
1 answer
96 views

How to fix error and what causes: Error: Main method is not static in class

I am getting this error: Error: Main method is not static in class oracle.Execution$, please define the main method as: public static void main(String[] args) When I run the command: java -jar ...
Shelen's user avatar
  • 169
-1 votes
1 answer
96 views

Unable to call main function in VS 2022

In VS 2022, the entry point of the code public static void main no longer exist. I was trying to implement a simple delegate but no output is shown on the console: using System; namespace ConsoleApp1 ...
user3209091's user avatar
0 votes
2 answers
166 views

Maven java.lang.ClassNotFoundException: Could not find or load main class

I have a problem with my Maven project. The program was already running without any problem but now I can't start it anymore. It is important that the user can run this application by just double ...
Odosco's user avatar
  • 21
0 votes
0 answers
25 views

Back to main menu button

Please help me with creating button to main menu in different plugins. For now I just have created 1 in on plugin called O Daily quests, because there was that button, and I just change way to main ...
Ivan's user avatar
  • 1
0 votes
0 answers
76 views

Zero argument count in main()? [duplicate]

I want to design an application that will run as GUI (wxWidgets) if there are zero arguments or parameters passed to main(). I can't get rid of command line (console) feature because the application ...
Thomas Matthews's user avatar
0 votes
0 answers
23 views

When I inspect Amazon I see Amazon wrap header, main and footer tags inside div. Why? If we have semantics tags so why use div to wrap these things?

When I inspect Amazon I see Amazon wrap header, main and footer tags inside div. Why? If we have semantics tags so why use div to wrap these things? And can we use semantic tag without wrap inside ...
Priyesh's user avatar
-2 votes
1 answer
164 views

Visual Studio 2022 CLR Empty Project (.NET Framework) entry point is not working, even after being set

I am trying to run a Windows Form in Microsoft Visual Studio 2022. When I attempt to run the solution I get the following error: "LNK1561 entry point must be defined", which links to this ...
shockin's user avatar
  • 11
0 votes
0 answers
43 views

Electron renderer not communicating with main process

I have a small html on top of my electron app which has a input. I want to make it so that when i insert a url into it and press enter, url in my second BrowserView changes and loads that website. ...
staa's user avatar
  • 13
0 votes
0 answers
21 views

i try to run jar file of game but it is not running showin jni erro has occured

enter image description here i created jar file of snake game. in eclipse snake game is running properly but after creating jar file it s not running as expected i am expecting it should run after ...
Sushant Dake's user avatar
-5 votes
1 answer
52 views

Why the Main function accepts (string [] args)? [duplicate]

I mean that I don't quite understand why such parameters as string [] and what should be passed into them, if Main is the entry point to the program. for example: static void Main(string[] args) { ...
N1ck0_o's user avatar
0 votes
1 answer
50 views

Python main() does not recognize returned value

1- I get this error when I try to print a return value from inside main => " name 'conversion' is not defined " 2- I have some dummy prints to debug my code def main(): time = input(&...
JPnAZ's user avatar
  • 13
0 votes
0 answers
91 views

Directly launch SwiftUI Main App in existing UIKit project

I revamp all my view controllers in SwiftUI. But still i am bound to use hostingVC for launching my SwiftUI views from scene delegate like below let splashVCHostingController = UIHostingController(...
Aaban Tariq Murtaza's user avatar
2 votes
2 answers
298 views

How to enable auto-generating main method when creating console application in VS Code in C#

In .NET 6.0, the Main method is simplified by removing and main method. Now it's possible to start writing code directly without it. But I want to enable it back and don't want to write it by hand ...
livan3li's user avatar
  • 581
1 vote
1 answer
171 views

Open a file with java application on macOS

I have a Java project that I compile both into an exe with launch4j and a mac app with universalJavaApplicationStub. On Windows I can open a file with the exe (right-click→open with) and it will be ...
Hans's user avatar
  • 2,442
0 votes
0 answers
13 views

NetBeans IDE: Set project to start main class from

I have two projects "gui" and "plugin". When I hit "Run", i want my gui project to run. When I am working on any file in my gui project, that will work. But currently I ...
StrangeConventions's user avatar
0 votes
0 answers
44 views

Render multiple columns in subreport Telerik

I am creating a Telerik report and in this report I am using few sub reports for some parts of this report. In one portion of the reports I need to display multiple items (detail with description) and ...
Nikhil Kumar's user avatar
0 votes
1 answer
796 views

Problem with "java.lang.reflect.InvocationTargetException"

I am very new to this and I have a problem with this message that I get every time I try to run a program. I've tried a thousand things and I don't know what else to do. If anyone could help me I ...
Alejandro Ardila's user avatar
0 votes
0 answers
114 views

Main.ts for Angular

For Google's Tour of Heroes, I realised that for chapter 3, "Create a feature component", file main.ts has to be modified, for the application to be able to start. Anyway, the contents of ...
user3500176's user avatar
0 votes
0 answers
552 views

VB.net BC30738 'Sub Main' is declared more than once in <application> My.MyApplication.Main(args As String())

Solved this issue and posting to help future readers. This happened when switching a Windows Forms App to start with my own Main() instead of a form. After experimenting with many different ways of ...
Mike D's user avatar
  • 1
0 votes
3 answers
235 views

If name main check in Nim

So, If you know Python, you should be familiar with this: def main(): <your code> if __name__ == '__main__': main() That creates a main function and checks if current files is being ...
Orlando Huang's user avatar
0 votes
0 answers
10 views

Sub from submodule namespace does not execute from MAIN sub

look at this example: unit module Mod; module Mod::TestModule { our sub testSub { say "ok" } } sub MAIN { Mod::TestModule::testSub } This does not print "ok", but it will ...
fingolfin's user avatar
  • 672
1 vote
1 answer
486 views

How to return a string as an error from main()?

Been trying to write a function just to do this. fn main() -> Result<i32, i32> { let clargs: Vec<String> = env::args().collect(); // validate command line arguments if ...
Jeff's user avatar
  • 45
1 vote
1 answer
113 views

Is it true that on a Linux Ubuntu system the main function is called by the _libc_start_main function?

My system : Ubuntu 22.04.3 running on x86_64 CPU. I have this C program in a file named test.c : int main(){ long int a = 10; long int b = 20; } I've compiled the file with "gcc test.c -...
alessio solari's user avatar
0 votes
0 answers
90 views

Get MainWindow Instance WPF

I have some custom extensions, which when i double-click on it, it launch program and every time as i do it, it creates new mainwindow. So i want not create, but update the first mainwindow. I searced ...
Bird's user avatar
  • 1
0 votes
0 answers
37 views

Below is a screenshot of the Entry Point error I get when I try to load an mp3 file into my script

def load_mp3_16k_mono(filename): """ Load a WAV file, convert it to a float tensor, resample to 16 kHz single-channel audio. """ res = tfio.audio.AudioIOTensor(...
Sifat-E-Jahan's user avatar
3 votes
1 answer
93 views

What kind of entity does the Main Class in Java represent? [duplicate]

Whenever we see an introduction to Object Oriented Programming, we commonly come across this explanation, A class is a blueprint of an object, it can be used to represent a real world entity virtually,...
nick's user avatar
  • 31
0 votes
1 answer
65 views

What does "args" equal or return in "main" if it has no value, I.E. no args (arguments) were passed when the program was executed

I have this code here: try { System.out.print("There are args!: " + args[0]); } catch (Exception e) { System.out.print("No args"); } I am checking if arguments were passed ...
X-VIPRIN's user avatar
0 votes
1 answer
33 views

CPLEX inserting results to Excel Sheet in main method

I am creating a project where I have one model where one variable is always changing, namely ForecastMultiplier. I need to put the results of each iteration into an excel spreadsheet. You can find ...
Anduliska's user avatar
1 vote
2 answers
50 views

CPLEX: Generating production planning for two factories delivering to n places with m scenarios

I am trying to create a model for production planning in two factories that deliver goods to five different locations. Each factory has a maximum capacity and a production cost rate. Additionally, the ...
Anduliska's user avatar
-1 votes
2 answers
85 views

Unable to access global variable in main function | python

I wanted to understand, how global scope works in if __name__ == '__main__': Block E.g: x = 2 if __name__ == '__main__': global x x = 10 print(x) The above will throw an exception: ...
Tushar's user avatar
  • 1,044
-1 votes
1 answer
70 views

Debugging issue in Sprinboot Application

I am trying to debug my spring boot application but debugger is getting suspended at run method but my application is working. @SpringBootApplication public class Application { public static ...
Prajwal Jathar's user avatar
0 votes
1 answer
247 views

How do I specify the entry point location in a Manifest-file to run a jar-file?

I am trying to run a program I've downloaded ( https://github.com/ottiram/MMAX2 ) which comes as a jar-file on Ubuntu 22.04. When I do, it returns: "no main manifest attribute, in MMAX2.jar"....
jak326i205's user avatar
1 vote
1 answer
22 views

main tab should be closed as the focus should be on that tab without explicitly shifting to that tab in selenium python [duplicate]

My question is that I excepted main tab to be closed after the execution of last of code as the focus should be on that tab after i closed the second tab. But instead I got this error, selenium.common....
Ali Haider's user avatar
1 vote
2 answers
1k views

Why am I getting the error 'Main method not found in class' even though I defined the main method in my Java program with inheritance? [duplicate]

package code.now; class Test { public void fun() { System.out.println("Coding Ninjas"); } } class Derived extends Test { public void fun() { System.out....
Goutham's user avatar
  • 39
0 votes
0 answers
55 views

main method not found in class Main

I am trying to run this class but I am getting an error that main method is not found although I have defined the public static void main (String [] args){} This is my class file : package jDBCLearn; ...
Ronit Pandey's user avatar

1
2 3 4 5
61