Project

General

Profile

Hi Everyone! Can you help me with graphics?

Added by Matt Picas over 8 years ago

Hi Everyone! My name is Matt and I'm new to witty and have been having problems with figuring out how to get an example with graphics to run. I am trying to follow the only instructions I've been able to find here: http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MS_Windows

I currently just reinstalled Windows Server 2012 R2, so it is a completely clean installation. I installed Microsoft Visual Studio 2012 with Update 5 as it suggested. I downloaded the boost .zip for 1.60 and extracted it to C:\boost_1_60_0 and navigated to the folder with Command Prompt and typed this command in:

bjam ---layout=versioned variant=debug,release threading=multi link=static runtime-link=shared install

It then created a separate C:\Boost folder with an include folder and a lib folder. Everything appears to have gone fine with the boost install from what I can tell, so I then installed the latest version of CMake, CMake 3.5.0 and I ran the CMake GUI and I clicked the configure button. It was able to find my boost installation without specifying the BOOST_PREFIX in the CMake GUI programs list but I set it to C:\Boost as the instructions mentioned I should and I pressed configure again and then one more time. It did complain about not finding a mspdb110.dll but the instructions said that it didn't effect anything and to proceed. The exact error for that was \"The program can't start because mspdb110.dll is missing from your computer. Try reinstalling the program to fix this problem.

The next step was to click on Wt.sln in the build folder, mine is located in C:\projects\witty\wt-3.3.5\build. It loaded up in Microsoft Visual Studio 2012 with Debug as the default and Win32 as the default selection for application building. After it initialized everything and the blue bar at the bottom said it was Ready I added the following to the ALL_Build project properties under Configuration Properties--->VC Directories:

First I added C:\boost_1_60_0 to the Include Directories box and then I added C:\Boost\lib to the Library Directories box. I did this because I saw it on youtube on a HOWTO video on installing boost and he mentioned how you needed to have that set for it to find the boost header files. That video was here: https://www.youtube.com/watch?v=5AmwIwedTCM

At this point I pressed F7 as the instructions indicated and I was able to get it to compile with 59 projects succeeded and 2 projects skipped. The next step was to right click the INSTALL project and set it as the startup project, which I did and then I was supposed to right click it and select build which I did and it succeeded as 1 project and created a directory for WT in C:\Program Files (x86)\WT.

My next step was to test if I could get an example program to work as I had done before with the hello.wt example. Following the instructions, I had to edit that projects property sheets as well. I went into the hello.wt projects property sheets and I went under Configuration Properties--->Debugging and I added the following:

Under Command Arguments I added ---http-address=0.0.0.0 ---http-port=8080 ---deploy-path=/hello ---docroot=. and under Environment I added PATH=c:/libraries/lib;c:/Boost/lib;<path to wt.dll>;<path to wthttp.dll> as the instructions indicated. An additional thing I did from an error that I had got in my previous operating system install when testing the hello.wt project was that I went to Linker--->Input and I added C:\Program Files (x86)\WT\lib\wthttpd.lib;C:\Program Files (x86)\WT\lib\wtd.lib; under Additional Dependencies so that it could find any information it needed there (which was a problem in my previous installation before I reinstalled Windows for a clean operating system)

So this is where I am at now and the most important thing for me is to get graphics to work, particularly images for .png, .jpg, et cetera. First I need to know which example project is good for testing images, first I want to get it to appear appropriately in an example project before I end up creating a project of my own. I previously tried getting Home.wt and widgetgallery.wt to work which I thought both would have images but I could only get widgetgallery.wt to actually load with no images whatsoever. This was after I tried to follow the instructions to install Graphics Magick where I downloaded the latest .zip of Graphics Magick and I extracted it to my C:\ drive. This was on my previous installation where I went into the VisualMagick/configure folder and ran configure.exe. Unfortunately it generates a solution for Microsoft Visual Studio version 7.0 which is very old and out dated, and it appears the only alternative is for it to generate a solution for the 6.0 version which is even more out dated. I did generate it as the instructions indicated by checking off Dynamic Multi Threaded DLL runtimes and Use X11 Windows in the configure.exe programs setup. After that however it says to open VisualStaticMT.sln when it generates as VisualDynamicMT because of the previous selection the instructions told me to make in the configure.exe Setup program.

I opened up that file anyway and I proceeded but when I got to compiling it 8 projects failed and I had 54 errors and I also had over 300 errors, on top of that I had to convert the code to the newer version of Microsoft Studio or it wouldn't work. After all of that I went into CMake and I showed it the location of Graphics Magick with the GM_PREFIX and I even set Graphics Magick as the WT_RASTERIMAGE_Implementation due to an error I got in CMake about it not being set. I pressed configure and then I went into Wt.sln and it had additional projects show up, about 64 I believe and I tried to get the examples to work from there and it didn't work.

The truth is I am very lost on how to get Graphics Magick to work and even though I followed the instructions I think they are out dated. If anyone could assist me with the best way to do this for Windows Server 2012 R2, Boost 1.60, CMake 3.5.0 with a clean operating system and a fresh build of witty in C:\projects\witty\wt-3.3.5 with my WT folder in C:\Program Files (x86)\WT I would appreciate it so much! I'm sorry this post was so long but I am trying my best to give you all the information possible to show you where I am at. I've tried looking around google searches and youtube videos on this for a long time but I haven't been able to dig up any information on how to get it working so I would really really appreciate the help you could give me! Thanks for your time, Matt


Replies (4)

RE: Hi Everyone! Can you help me with graphics? - Added by Saif Rehman over 8 years ago

What's the error that you get when you try to run/compile the example project?

RE: Hi Everyone! Can you help me with graphics? - Added by Saif Rehman over 8 years ago

What do you mean by testing images? From a quick glance at ur post, GraphicsMagick is not required to transfer images, instead it's for creating and editing images. Make sure the docroot is set to a directory that includes Wt's resources folder and widgetgallery's docroot folder's contents.

RE: Hi Everyone! Can you help me with graphics? - Added by Matt Picas over 8 years ago

Hi Saif! Thanks for the reply, I'm currently not getting an error with bare bones Witty with only Boost and CMake, I have yet to be able to get any example with images to display the images though. I want to get it to appear appropriately in an example project before I end up creating a project of my own. I am brand new to Witty so I have never made a project of my own with it yet, I see in the widget gallery that there is code to make an image:

http://www.webtoolkit.eu/widgets/layout/images

I'm not entirely sure how to implement that into a separate project, I figured I would test the images for something like the Home.wt example before I do that (although I couldn't get the example project Home.wt to run last time).

It's interesting you say that you can transfer images without Graphics Magick, I'm going to tell you exactly what I did to try to get Home.wt to work appropriately (assuming it can work with barebones Witty, with only Boost and CMake). It does say that it needs the resources directory to work correctly in the old installation guide: http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MS_Windows.

Okay, so I set Home.wt as the startup project in Wt.sln using debug win32. Next I right clicked the Home.wt example project and went into it's property sheets. From here I went under Configuration Properties--->VC and I added to it's Include Directories C:\boost_1_60_0 and then I added to it's library directories C:\Boost\lib. After I did that I went to Linker--->Input and I added C:\Program Files (x86)\WT\lib\wthttpd.lib;C:\Program Files (x86)\WT\lib\wtd.lib; to Additional Dependencies so it has access to the libraries installed in C:\Program Files (x86)\WT\lib\.

After this I went under Configuration Properties--->Debugging and I added PATH=c:/libraries/lib;c:/Boost/lib;<path to wt.dll>;<path to wthttp.dll> to Environment and then under Command Arguments is where I deviate from what I tried before by changing the docroot from ---docroot=. to what you told me to do which was to set the directory to a directory that includes Wt's resources folder and in this case Home.wt's docroot folder's contents. I thought that ---docroot=. was correct because it says to set it that way in the instructions but now it is set like this ---docroot=C:\projects\witty\wt-3.3.5\examples\wt-homepage

The complete line is: http-address=0.0.0.0 ---http-port=8080 ---deploy-path=/hello ---docroot=C:\projects\witty\wt-3.3.5\examples\wt-homepage which I added to the Command Arguments for Home.wt under Configuration Properties--->Debugging.

So in that directory is all the default stuff that should be for that project, icons, header files, xml files. Within the directory there is an icons folder, a css folder, and I copied the resource folder itself and placed it in C:\projects\witty\wt-3.3.5\examples\wt-homepage. So that should be everything from what I've learned so far, so I pressed f5 on the project to run it

As it was starting I got this in my Output window:

'Home.wt.exe' (Win32): Loaded 'C:\projects\witty\wt-3.3.5\build\examples\wt-homepage\Debug\Home.wt.exe'. Symbols loaded.

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

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

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

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\apphelp.dll'. Cannot find or open the PDB file.

SHIMVIEW: ShimInfo(Complete)

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

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

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110d.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.

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

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

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

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

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

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

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

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.

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

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

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

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

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

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

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x01AAEA38.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x01AAEA38.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: [rethrow] at memory location 0x00000000.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: [rethrow] at memory location 0x00000000.

'Home.wt.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\NapiNSP.dll'

'Home.wt.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\nlaapi.dll'

'Home.wt.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winrnr.dll'

The program '[5236] Home.wt.exe' has exited with code 0 (0x0).

So I went to Tools~~Options~~>Debugging->Symbols and selected checkbox "Microsoft Symbol Servers" to download those PDB's automatically (I googled this). I got a warning about performance varying but I ignored that for now. Okay so I pressed F5 again:

And this was my Output:

'Home.wt.exe' (Win32): Loaded 'C:\projects\witty\wt-3.3.5\build\examples\wt-homepage\Debug\Home.wt.exe'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mswsock.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110d.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\NapiNSP.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nlaapi.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dnsapi.dll'. Symbols loaded.

'Home.wt.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winrnr.dll'. Symbols loaded.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x01AAEC4C.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: Wt::WServer::Exception at memory location 0x01AAEC4C.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: [rethrow] at memory location 0x00000000.

First-chance exception at 0x75CC4DBD in Home.wt.exe: Microsoft C exception: [rethrow] at memory location 0x00000000.

'Home.wt.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\NapiNSP.dll'

'Home.wt.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\nlaapi.dll'

'Home.wt.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winrnr.dll'

The program '[5516] Home.wt.exe' has exited with code 0 (0x0).

So the problem was the program is exiting, so this time I ran it with Ctrl+F5 so that it puts a breakpoint at the end but I thought it is supposed to be like the hello.wt example which keeps the box open and functions as a webserver.

Okay so the box comes up with the breakpoint and this is what it says: Option no compression is implied because wthttp was built without zlib support. Specify http address and/or https address to run a http/https server. I did specify this in Command Arguments http-address=0.0.0.0 ---http-port=8080 ---deploy-path=/hello ---docroot=C:\projects\witty\wt-3.3.5\examples\wt-homepage and it was working on the hello.wt example.

Do you know what's wrong?

RE: Hi Everyone! Can you help me with graphics? - Added by Wim Dumon over 8 years ago

Did you inlcude the '---' in front of http-address? So ---http-address instead of http-address?

Wim.

    (1-4/4)