Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

How to set up a java module to run directly (not via a .jar file) without having to specify a main class

How does one set up a java program that can be run as a module simply by doing java -m mymodule? I know this is possible because I have seen it in, e.g., the jwebserver documentation; you can run this ...
Tasos Papastylianou's user avatar
0 votes
1 answer
49 views

invalid command name 'main:app' when I execute "uvicorn main:app --reload" [duplicate]

When I try to execute the command uvicorn main:app --reloadfor start my local server, the VSCode terminal throws the error invalid command name 'main:app'. The code below imports a variable from the ...
RAFAEL HSL's user avatar
-1 votes
1 answer
79 views

Why am I getting error: "C2731: 'wWinMain' : function cannot be overloaded"?

I am getting this error in my program : error C2731: 'wWinMain' : function cannot be overloaded at this line: int APIENTRY wWinMain(_In_ HINSTANCE hInst, _In_opt_ HINSTANCE hprevInst, _In_ LPCWSTR ...
Zmouch Zmouch's user avatar
0 votes
0 answers
32 views

How to resolve "Entry point Not Found" in release mode

I am developing one DLL in VC++ and its working while testing with my Test.exe app in debug mode. But while running Test.exe in release mode I am getting "Entry point Not Found" error While ...
Sijith's user avatar
  • 3,922
0 votes
1 answer
91 views

Why the name of the entry point in top level statements is "<Main>$" and not "Main"?

When we use top level statements in C# 9 (and later), where we can omit static void Main(string[] args) and internal class Program, our program does not begin at the Main method; but rather, <Main&...
winscripter's user avatar
0 votes
0 answers
57 views

Best approach for displaying license activation dialog

I have a text editor, now I'm implementing licensing support. Licenses are managed on a third-party server (SAAS). Desired Flow The user opens the editor. If they have no license (first-time open): ...
André Polykanine's user avatar
-1 votes
1 answer
62 views

Exiting back to main menu

I am currently writing a basic program with multiple menus. I have a function called menu1(), which is called in main and handles the first set of menu options. My issue I am having is being able to ...
Jack Ross's user avatar
0 votes
0 answers
62 views

Python GUI runs separate scripts through subprocess calls, but doesn't work when packaged as .exe

I have an interface I've created called interface.py that runs a script based on the press of a button... def submit_action(selected_item): values = list(item_to_value[selected_item]) ...
intrepid's user avatar
-1 votes
1 answer
99 views

Does every translation unit need to have a main function? [closed]

I have been reading the 2nd edition of A Tour of C++ by Bjarne Stroustroup and in section 3.2 on Separate Compilation, he mentions translation units. A .cpp file that is compiled by itself (...
heretoinfinity's user avatar
0 votes
1 answer
83 views

Should Portable Types Be Used in the Declaration of a Main Function? (C11)

This question came to me last night, and I couldn't find a definitive answer in my brief surf of Google. Should (or could) I use portable types (i.e int32_t) in the declaration of my program's main ...
Zenais's user avatar
  • 136
1 vote
1 answer
76 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
62 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
138 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
61 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
30 votes
4 answers
5k 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
  • 677
1 vote
1 answer
62 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
40 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
61 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
275 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
75 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,315
0 votes
0 answers
34 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
25 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
169 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
2k 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
72 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
111 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
194 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
478 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
68 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
77 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
30 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
343 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
67 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
55 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
52 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
163 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
635 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
  • 839
1 vote
1 answer
309 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,482
0 votes
1 answer
1k 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
252 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
1 answer
877 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
327 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
1 vote
1 answer
777 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
126 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
99 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
  • 11
0 votes
0 answers
39 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
104 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
75 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
49 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
2 3 4 5
61