Re: undefined reference to "main"

2023-04-05 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Originally vibe.d included its own main function by default. That is now opt-in instead of opt-out. Circa 2016. You can either add the version ``VibeDefaultMain`` or use a main function and call ``runApplication`` yourself. https://vibed.org/docs#first-steps

Re: undefined reference to "main"

2023-04-05 Thread FeepingCreature via Digitalmars-d-learn
On Wednesday, 5 April 2023 at 09:19:17 UTC, Alexander Zhirov wrote: How to compile the example given in the book correctly? When compiling, an error occurs that the main function is missing. If I replace `shared static this()` with `void main()', then everything starts. What does the

undefined reference to "main"

2023-04-05 Thread Alexander Zhirov via Digitalmars-d-learn
How to compile the example given in the book correctly? When compiling, an error occurs that the main function is missing. If I replace `shared static this()` with `void main()', then everything starts. What does the compilation string in `dub` and `dmd` look like correctly? ```d import

Re: Using packages: undefined reference to main

2017-03-17 Thread cloutiy via Digitalmars-d-learn
On Friday, 17 March 2017 at 16:16:00 UTC, bachmeier wrote: On Thursday, 16 March 2017 at 17:55:13 UTC, cloutiy wrote: I'd like to try making a simple web app using vibrant.d, however I don't think I'm using it correctly since I'm getting a linking error when compiling. Below is my SDL with

Re: Using packages: undefined reference to main

2017-03-17 Thread bachmeier via Digitalmars-d-learn
On Thursday, 16 March 2017 at 17:55:13 UTC, cloutiy wrote: I'd like to try making a simple web app using vibrant.d, however I don't think I'm using it correctly since I'm getting a linking error when compiling. Below is my SDL with added vibrant.d dependency: name "cvmaker" description "A

Using packages: undefined reference to main

2017-03-16 Thread cloutiy via Digitalmars-d-learn
{ Get("/hello", (req, res) => "Hello World!"); } } However I get a linking error when running the command 'dub' in my project folder: Linking... /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../lib/crt1.o: In function `_start': (.text+0x20): undefined refer