[home] [description] [documentation] [download] [mailing lists] [contact tmk]



tmk Frequently Asked Questions (FAQ)

http://tmk.sourceforge.net/doc/tmk-faq.html




Question:  Where can I get tmk?

Answer:  tmk is freely available on the web, at http://tmk.sourceforge.net


Question:  What kind of license is tmk under?

Answer:  tmk runs under the GNU general public license (GPL). Please have a look at http://www.gnu.org/copyleft/gpl.html


Question:  What is wrong with writing something like

  append CCFLAGS "-woff 15 -ansi"
in my TMakefile?

Answer:  That is one of the most commonly made mistakes concerning Tcl/tmk. The problem simply is that append only appends a string as it is to a variable. So if CCFLAGS already contains a compiler flag, say "-woff 23". In that case, the resulting string after using append would be "-woff 23-woff 15 -ansi". As you can see, there is a blank missing before the second -woff.


Question:  So if append isn't right, why can't I write

  lappend CCFLAGS "-woff 15 -ansi"
instead?

Answer:  lappend treats its arguments as words to be appended to the list contained in the specified variable. If a word contains whitespace characters, it will be quoted in curly braces so that it is not interpreted as more than one word in the list. If CCFLAGS already contained "-woff 23" before, the result after using lappend would read:

  -woff 23 \{-woff 15 -ansi\}
which is problably not what you intended. There correct method is to quote each word separately or simply leave out the quotes, e.g.
  lappend CCFLAGS -woff 15 -ansi


Question:  I get the error message ``::link::LINKER is not defined''. What does this mean ?

Answer:  Make sure to place the compiler modules first in your TMakefile. So use

module { cxx glut png }
instead of
module { glut png cxx }

Some modules need to know which compiler or linker is used


Question:  In my working group we use OpenGL on sgi IRIX machines. For some directory, I want to use the MESA OpenGL Library instead. How can I specify the necessary paths and libraries, so that they override the default settings?

Answer:  There are several ways to do that. For a single directory, the easiest way is to change the module variables before loading the module, e.g. like this:

set opengl::LIBPATH /.../my-mesa/lib
set opengl::INCPATH /.../my-mesa/include
set opengl::LIBS    ...  
# load module AFTER changing the macro variables
module opengl

If you want to change this settings for a whole project, you can do this in the TMakefile.proj. If you want to change the settings globally, you can also change the config files, for example by adding a different version of the OpenGL module, or by simply creating a new MESA module.





[home] [description] [documentation] [download] [mailing lists] [contact tmk]

tmk-home