Finally, I installed the software. I never used Linux in a day. I suddenly used it. I spent one day tutoring the basics of Linux and reading the instructions on installing the software, is it troublesome to use configure configuration? I have to manually modify several files myself, and that file cannot be understood by myself. There is no basis for software development in Linux. Let's talk about the installation process in Ubuntu! 01. decompress the package. I decompress it to the desktop. It is not good because it was discovered later that the source files are still used. Of course
Finally, I installed the software. I never used Linux in a day. I suddenly used it. I spent one day tutoring the basics of Linux and reading the instructions on installing the software, is it troublesome to use configure configuration? I have to manually modify several files myself, and that file cannot be understood by myself. There is no basis for software development in Linux.
Let's talk about the installation process in Ubuntu!
01. I decompress the package to the desktop. It is not good because it was discovered later that the source files still need to be used. Of course, you can create folders in your own directory, or under home.
02. Configure the makefile file at the top level.
You need to change prefix =/CSLinux to/usr/local (this is changed by referring to the installation instructions)
And create cnetlib (required) under usr/local. Other parameters are default.
03. Install the following software: tcl8.5, tcl8.5-dev, tk8.5, and tk8.5-dev (for the differences between these files, refer to the official introduction of ubuntu) and libelf. x11. after the installation is complete, remember their header file path, which will be used later, because the compilation software needs to be used. Note that (there seems to be no include folder under x11r6 in ubuntu)
04. You do not need to change the config. h file. Its function is to detect the system and set some installation environments. The default value is tcl/tk. We will use this here.
05. Modify makefile. Linux
This file is mainly used to guide the path of some lib libraries and header files of libelf, tcl/tk. The modification method is as follows:
Un-commented the line LIBELFDIR =-L/usr/lib and commented the line LIBELFDIR =-Llibelf. (Note un-commenting means removing the # before the line and commenting means adding a # at the starting of the line .)
Commented the line LIBELFINC =-Ilibelf and added a new line LIBELFINC =-I/usr/include after that.
Changed values of XINCLUDES, XLIBDIRS and XLIBS, such that the concerned lines now looked like as below
Xshortdes =-I/usr/include/tcl8.4 (the change is relatively large here. It turns out that the folder-l/usr/x11r6/include is not available under ubutnu, so it is not possible to reinstall the folder, however, from the perspective of functionality, it should be tcl
XLIBDIRS =-L/usr/lib
XLIBS =-ltcl8.4-ltk8.4-lX11 (note the version number, which is 8.5)
Note the TCL and TK libraries version numbers. If you use another version then change the above accordingly
The last step is make. There will be a warning, followed by make install. After the test is completed, cd is first transferred to the EXAMPLES path and input: cnet T2. A graphic simulation interface is displayed.