Subj : Re: Building a dll with command line compiler To : borland.public.cpp.borlandcpp From : Steven Harris Date : Thu May 20 2004 01:39 pm Problem solved. For anyone interested in doing the same thing here's how to compile and link C code into a dll: Assumptions: you have 1 source file called myfile.c Compile the C code first using: bcc32 -c myfile.c If you are using JNI then you will want to include the JNI header so the compile command will look like this: bcc32 -I%JAVA_INCLUDE% -I%JAVA_INCLUDE%\win32 -c myfile.c (this assumes the environment variable JAVA_INCLUDE is set to the path of the include directory inside your java installation). Then link the code using: ilink32 /c /aa /Tpd c0d32.obj myfile.obj, myfile.dll, myfile.map, import32.lib cw32mt.lib Steven "Steven Harris" wrote in message news:40ac8868$1@newsgroups.borland.com... > Hi, > Im trying to build a dll using the free commmand line compiler but I > have no idea of what to put on the command line to build it. I cant seem to > find any documentation anywhere that says how to use this compiler to build > a dll. > > Im building the dll so that I can use it with Java using the JNI interface. > Ive been following the tutorial at > http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html > > but cant get past the step in which I compile the C into a dll. > > Any help would be greatly appreciated. > Thanks, > Steven > > .