Project

General

Profile

Hello World Example not working on Visual Studio 2012 Express

Added by Philipp Bürki over 9 years ago

So after successfully managed to start the "blank" application with debugging I can not make the Hello, WT example work as described here:

http://www.webtoolkit.eu/wt/doc/tutorial/wt.html

Steps I have done:

1. Configured WT in MSVS like by the easy method (http://redmine.webtoolkit.eu/projects/1/wiki/Installing_Wt_on_MS_Windows)

2. Added a new Header File in the project under Header Files and copy pasted the code from the tutorial.

3. Tried both command arugments ---http-address=0.0.0.0 ---http-port=8080 ---deploy-path=/hello ---docroot=. and

---docroot . ---http-address 0.0.0.0 ---http-port 8080

The application window starts with nothing in it. I maybe need to mention that I am pretty much a beginner when it comes to c especially with networking. But I guess I pretty much did what the docs explained.

Maybe I need to open some ports or don't make a header file?

Regards

Philipp


Replies (10)

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Philipp Bürki over 9 years ago

I tried to make it work again today and decided to make a short video which might explain things a bit better:

https://www.youtube.com/watch?v=ig1Qhg5unlg

The symbols for debugging are also not loaded correctly, as shown at the end of the video. So I might as well set up someething completly wrong.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Tyler Ward over 9 years ago

I'm also new to wt but I have a few tips for you. First off, I didn't watch the entire video (at work atm) but I got the gist of it. I'm using Debian (Linux distro) and things went very smooth. When you start the built in webserver with the scripts you mentioned above, you need to use a browser to navigate to the server to see your webapp. You will not run the app through MSVS.

Assuming the script worked and the server was started, navigate to "localhost" on your browser to test the page. The terminal you started the script with will display text when you connect to it. If the script didn't work, it probably hasn't compiled properly or something.

I found Linux easier to get things running. Ubuntu and Debian are both great OS's for development and especially for turning into a webserver if you app goes live.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Wim Dumon over 9 years ago

Hi,

I watched a part of your video and stopped after the few first glitches I saw. First of all, you're building a win32 GUI application, so main won't be main but wmain (IIRC, could be winmain or similar, I'm no specialist). The main() function will never be called. I recommend you to start from a completely empty command line C project with only the contents of the hello.C file.

Secondly, in the properties, environment is wrong. It should be something like 'PATH=c:/path/to/wt-3.3.3/bin'. You must adapt this string to where you installed Wt, so please don't blindly copy it.

Best regards,

Wim.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Philipp Bürki over 9 years ago

I couldn't make it work on MSVS Express 2012, even with an empty command line project. Next time I'll try my luck with linux maybe.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Wim Dumon over 9 years ago

Wt supports MSVS very well, including MSVS express edition. Any clue on what's not working?

Best regards,

Wim.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Philipp Bürki over 9 years ago

I am sure that I make some noob mistake.

When I start debugging the empty project with the HelloWT.cpp in the source files, I get the following system error in a message box:

"The program can not be started because wtd.dll is missing on this computer."

This is the debug output in VS2012 Express Desktop.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\Project1.exe'. Symbols loaded.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.

The program '[3868] Project1.exe' has exited with code --1073741515 (0xc0000135) 'A dependent dll was not found'.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Wim Dumon over 9 years ago

That's because in The Environment field in the Debugging tab of your project properties, you need to put:

PATH=c:\location\of\wt-3.3.1\bin

Assuming that you installed wt in c:\location\of\wt-3.3.1\bin

Wim.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Philipp Bürki over 9 years ago

Hm, the dll files are all found now after I copied them in the same folder as the exe as suggested here:

http://stackoverflow.com/questions/4953843/why-cant-visual-studio-find-my-dll

It didn't work with the path dependencies from the example.

But unfortunately it still doesn't work. By pressing debug a shell window opens very shortly and the program exits with the following debug key:

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\Project1.exe'. Symbols loaded.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\wtd.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\wthttpd.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp110d.dll'. Symbols loaded.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcr110d.dll'. Symbols loaded.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\ssleay32d.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\libeay32d.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\libhpdfd.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\mswsock.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\zlib.dll'. Module was built without symbols.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\libpng14d.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ddraw.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcr110.dll'. Symbols loaded.

'Project1.exe' (Win32): Loaded 'C:\location\of\wt-3.3.1\Project1\x64\Debug\zlibd.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\dciman32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\NapiNSP.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\pnrpnsp.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\nlaapi.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\dnsapi.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\winrnr.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Program Files\Bonjour\mdnsNSP.dll'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Cannot find or open the PDB file.

'Project1.exe' (Win32): Loaded 'C:\Windows\System32\winnsi.dll'. Cannot find or open the PDB file.

First-chance exception at 0x00007FF8F49B5BF8 in Project1.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x000000294A0BE450.

First-chance exception at 0x00007FF8F49B5BF8 in Project1.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x000000294A0BE450.

First-chance exception at 0x00007FF8F49B5BF8 in Project1.exe: Microsoft C exception: [rethrow] at memory location 0x0000000000000000.

First-chance exception at 0x00007FF8F49B5BF8 in Project1.exe: Microsoft C exception: [rethrow] at memory location 0x0000000000000000.

First-chance exception at 0x00007FF8F49B5BF8 in Project1.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x000000294A0BE450.

First-chance exception at 0x00007FF8F49B5BF8 in Project1.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x000000294A0BE450.

The program '[5720] Project1.exe' has exited with code 1 (0x1).

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Wim Dumon over 9 years ago

This doesn't look too bad. What is the console output of the application? Probably there's an error in the command line parameters. You may try to press CTRL-F5 to keep the command line window visible.

WRT the path, I don't know what you're doing, but this certainly works: next to looking in the same directory as the .exe file, DLLs are also searched in the PATH on Windows.

Best regards,

Wim.

RE: Hello World Example not working on Visual Studio 2012 Express - Added by Philipp Bürki over 9 years ago

Thank you very much, I could make it work.

I can access the localhost over localhost:8080.

    (1-10/10)