Notes about Linux (Gentoo) - Programming
(Or, back to main notes index)
- When compiling programs that use X headers and need X libraries, add to the "linker flags" (LDFLAGS) "-lX11".
- To avoid "/usr/bin/ld: cannot find -lX11" error write "-L/usr/X11R6/lib" somewhere before "-lX11".
- Use "bsh.Interpreter" to run "xxx.java" files.
- If you're a programmer and want to be able to debug your programs, don't use the flags -fomit-frame-pointer and -O3 in the CFLAGS parameter of /etc/make.conf!!!
- List of programming GUIs/IDEs
- Nvu, Amaya and FCKeditor are two free WYSIWYG (What You See Is What You Get) HTML editors.
- If, after installing Eclipse C++ / Europa, you get the error message...
* run-java-tool is not available for sun-jdk-1.5 on i686 * IMPORTANT: some Java tools are not available on some VMs on some architectures
...then edit the file /usr/bin/run-java-tool and after the line 15...
tool=$(basename $0)
...insert after that the additional line:
[[ $tool="run-java-tool" ]] && tool="java"
Please mind the blanks after and before the double brackets.
- If, while starting Eclipse C++ / Europa you get the error message that the file cannot be executed, enable in the kernel the 32-bit compatibility (IA32).
- If you're using a 64-bit system and Eclipse C++ / Europa doesn't want to start (brings back the execution line in a X window), emerge "emul-linux-x86-java" and select the 32-bit JVM with "java-config".
- If, during a compilation, you get an error message similar to...
{standard input}: Assembler messages: {standard input}:7095: Warning: end of file in string; '"' inserted g++: Internal error: Killed (program cc1plus)
...then it's probably because memory is missing (swapfile active?) or because the memory is corrupted.
- If when trying to use sqlite in a C++-project you get errors like
undefined reference to `sqlite3_open'or similar stuff, edit you Makefile and add the instruction-lsqlite3so that the linker knows it has to bind as well the sqlite libs. - If when executing a program which makes usage of QThread you get segmentation faults, make sure that in the Makefile you included the instruction"
-DQT_THREAD_SUPPORT" and afterwards clean and recompile the whole project. Make as well sure that QT was compiled using the "thread" flags. - An example of using "./configure":
./configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu CFLAGS="-march=nocona -O2 -pipe" CXXFLAGS="-march=nocona -O2 -pipe" --prefix=/opt/myprogs/graphicsmagick
- To compile java programs:
javac xxxx.java - To run compiled java programs:
java xxxx(omit the ".class" ending) - If you get in Excel the error message winhttp5.dll or higher must be registered to use the ServerXMLHTTP object, run the following in a command shell:
C:\>regsvr32 /u C:\OS\system32\msxml4.dll C:\>regsvr32 /u C:\OS\system32\msxml.dll C:\>regsvr32 C:\OS\system32\msxml.dll C:\>regsvr32 C:\OS\system32\msxml4.dll
- When compiling, the linker flags e.g. "-lsqlite" will make the linker search in /usr/lib64 a file called libsqlite.so.