date: 2004-06-16

This is the ViewsQT port for Linux, ported by
Mihael Vrbanec (miqster@gmx.net),
Johannes Eickhold (JEickhold@gmx.de) and
Matthias Kempka (mkempka@mkempka.de).
It has run on Debian unstable and testing machines correctly, but we can give no guarantees that it will run on other distributions. Please contact us if you experience difficulties or further success stories.

contents of this document:

0. DEPENDENCIES
I. COMPILATION
II. TESTING
III. PROBLEMS
  1. Compilation Problems
  2. Compilation Problems with QtWrapper
  3. Runtime Exceptions running University.exe
  4. Event Handling Problems running University.cs


0. DEPENDENCIES

  1. Before you try anything else, be sure you have at least Qt Version 3.2.3 and the appropriate header/development files installed. Use the multithreaded (mt) version. The header files are in packets like packetname-dev on most distributions. So, on a debian machine, it would look like:
    $ dpkg -l libqt
    
    [...]
    ii  libqt3-headers            3.2.3-2                   Qt3 header files
    [...]
    ii  libqt3-mt-dev             3.2.3-2                   Qt development files (Threaded)
    [...]
    ii  libqt3c102-mt             3.2.3-2                   Qt GUI Library (Threaded runtime version)
    [...]
    
  2. You need mono and a c-sharp compiler (mcs) to be running and the binaries to be in the path.

I. COMPILATION

In the ViewsQt directory run
$ make
If you are lucky, it compiles all the necessary stuff and it works for you. If you experience problems, go to section PROBLEMS.
Three files are necessary for using it:

II. TESTING

If the make completed successfully, do
$ cd University/release
$ LD_LIBRARY_PATH=. mono University.exe
You should see a window popping up running the University.cs example from the C# Concisely Homepage. Note that the files mentioned in section I. have been copied to this directory.
You also may test with analogous commands if the TestGUI application runs on your machine. It has been a memory hole on our machines, though.

III. PROBLEMS

  1. Compilation Problems:

    If your make returns with an error like
    [...]
    make[1]: mcs: Command not found
    make[1]: *** [release/TestGUI.exe] Error 127
    make[1]: Leaving directory `/home/mak/ViewsQt/TestGUI'
    make: *** [all] Error 2
    
    make sure, the C# Compiler mcs is in your path.

  2. Compilation Problems with QtWrapper:

    If you receive a really long error beginning with:
    QtWrapper::getText(std::string*)
       const':
    QtWrapper.cpp:392: error: call of overloaded `basic_string(QString)' is
       ambiguous
    /usr/include/c++/3.3.2/bits/basic_string.tcc:225: error: candidates are:
       std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*,
       const _Alloc&) [with _CharT = char, _Traits = std::char_traits, _Alloc
       = std::allocator]
    /usr/include/c++/3.3.2/bits/basic_string.tcc:192: error:
       std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
       std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
       std::char_traits, _Alloc = std::allocator]
    
    [...]
    
    or if you receive a really long error beginning with:
    QtWrapper.cpp: In member function `const void* QtWrapper::getText(std::string*)
       const':
    QtWrapper.cpp:392: error: no matching function for call to `
       std::basic_string, std::allocator >::
       basic_string(QString)'
    /usr/include/c++/3.3/bits/basic_string.tcc:233: error: candidates are:
       std::basic_string<_CharT, _Traits, _Alloc>::basic_string(typename
       _Alloc::size_type, _CharT, const _Alloc&) [with _CharT = char, _Traits =
       std::char_traits, _Alloc = std::allocator]
    /usr/include/c++/3.3/bits/basic_string.tcc:226: error:
       std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*,
       const _Alloc&) [with _CharT = char, _Traits = std::char_traits, _Alloc
       = std::allocator]
    [...]
    
    edit the file QtWrapper/Makefile In line 10 and 11 there are 2 different lines defining COMMON_CXXFLAGS. Try the other one. There seem to be different versions of Qt which have a must or a must not for the -DQT_NO_ASCII_CAST flag.

  3. Runtime Exceptions running University.exe:

    If your compile succeeded and you get an error at runtime saying
    Exception caught, message follows:
    QtWrapper.dll
    
    Unhandled Exception: System.NullReferenceException: A null value was found where an object instance was required.
    in <0x00014> University.AccessControl:run ()
    in <0x00053> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
    
    
    Unhandled Exception: System.NullReferenceException: A null value was found where an object instance was required.
    in <0x00083> University.AccessControl:Go ()
    in <0x00029> University.AccessControl:Main ()
    
    you need to get the file QtWrapper.so into your ld library path. This can be done by various methods.
    1. specify the LD_LIBRARY_PATH variable either using export with
        $ export LD_LIBRARY_PATH=directory/containing/QtWrapper.so
      
      or directly specifying it at the begin of the command as seen in section II.

    2. put the path containing the file QtWrapper.so in /etc/ld.so.conf and run
        $ ldconfig
      
      to update your library path cache. You most likely will need to be root to do that.

    3. quick and dirty: copy the file QtWrapper.so into a path that already is in the library path like /usr/local/lib or (quick and DIRTY:) /usr/lib

  4. Event Handling Problems running University.cs:

    If you experience problems like buttons that only can be clicked once, try to figure out why this happens and tell us. We don't have a solution for that one (yet).