Showing posts with label compile. Show all posts
Showing posts with label compile. Show all posts

Friday, 17 April 2009

Linker Tools Warning LNK4098

Ever got that Warning when you're using MSVC to compile a program?

If you have you should visit the following link.

Monday, 13 April 2009

Java HelloApp Program

I've recently been using Java again, so I thought I'd present some simple programs you can run in Java. Just type the following into a text editor but be careful because Java is case sensitive. Certain commands are expected to be entered using upper case letters.

public class HelloApp
{
public static void main(String[] args)
{
System.out.println("Hello, World!");
}
}

Save the file as HelloApp.java & compile it with the following...

javac HelloApp.java

Run it with the following...

java HelloApp

If you want to generate documentation using JavaDoc just type the following...

javadoc -d docs HelloApp.java

Finally, if you'd like to place your class in a Jar file, you must first create a Manifest file. Just place the following text in a file called Manifest.txt & make sure you place a newline at the end.

Main-Class: HelloApp


Then create the Jar file by typing the following...

jar cvfm HelloApp.jar Manifest.txt *.class

Run the Jar file with the following...

java -jar HelloApp.jar

Saturday, 21 June 2008

Linux FLTK Program

The following commands will allow you to compile an FLTK program in Linux.

Imagine you had a program called mywindow.cpp & a header file called mywindow.h

g++ -g -Wall mywindow.h mywindow.cpp -lfltk -lXft -lXext -lX11 -o mywindow