www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Errors running a vibe.d program using dub

reply "Jacek Furmankiewicz" <jacek99 gmail.com> writes:
Hi, first time D newbie here, so please forgive me.

I am trying to write my first D program, namely a basic web 
server using vibe.d and dub.

The code is the basic code on the vibe.d page:

http://vibed.org/

After installing dub, I init a new project using it and followed 
the steps on how to add vibe.d as a dependency:

http://vibed.org/docs#first-steps

When I try to compile and run it using dub, I get:

dub
Checking dependencies in '/home/jacekf/tmp/webd'
Building configuration "application", build type debug
Compiling...
Linking...
/usr/bin/ld: cannot find -levent
/usr/bin/ld: cannot find -levent_pthreads
collect2: error: ld returned 1 exit status
--- errorlevel 1
Error: Link command failed with exit code 1

Run 'dub help' for usage information.


I made sure on my Ubuntu (64-bit) box, I have libevent installed 
(both the libevent-1.4.2 and libevent-2.0.5 packages, not sure 
which one it needs), as
well as libevent-pthreads-2.0-5.

Still no luck, I am obviously missing something very basic.

Thank you for any help in helping me with my first D program.

Cheers
Jacek
Nov 13 2013
parent reply "Dicebot" <public dicebot.lv> writes:
Don't use Ubuntu but clearly you installed libevent packages are 
wrong. Most likely those are shared library packages and vibe.d 
wants to link to static libraries. This is what vibe.d Ubuntu 
setup guide suggests:

sudo apt-get install libevent-dev libssl-dev

Have you tried that?
Nov 13 2013
parent "Jacek Furmankiewicz" <jacek99 gmail.com> writes:
Thank you so much, I missed that page.

I am running now, much appreciated.
Nov 13 2013