Re: Command line compiler
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Sat, 03 Jun 2006 01:38:14 -0400
Those are the "prebuild", "postbuild" steps, not at all hard to add to VS. I've done it
frequently. I had a yacc parser that was a prebuild step and a version number incrementer
that is a postbuild step. In the case of building a DLL, you set the application to run
the DLL under as "java" with the appropriate command line.
joe
On 2 Jun 2006 23:04:08 +0200, Peter <p@xxxxxxxxxxxxxxxx> wrote:
Jonathan Wood <jwood@xxxxxxxxxxxxxxxx> wrote:Joseph M. Newcomer [MVP]
All I would say is: Try getting to the point where you are used to compiling
from the IDE and then see how the two methods compare. I won't say you
should do it one way or the other, but the vast majority of people using
this tool find the IDE far more easy and productive. And I think there are
valid reasons for this.
Just a thought.
No, I agree with you. Actually, I usually do use the VC++ IDE.
I'm basically a C/C++ programmer who was hired by a company that seems to
love Java (I was hired for my math knowledge, not my programming knowledge).
Part of my current project requires interfacing C and C++ with Java, so I've
been learning the JNI API
I've been working through a book on JNI, which requires that I create library
files. I've been following along with the examples and doing exercises both
on Windows and Linux.
Since for this particular purpose I need to write, edit, compile, and run
Java programs, the easiest thing to do (for me) is to use vim with
makefiles. So my Makefile entries would look something like:
0. Write the Java program.
1. Use javac to compile a .java to a .class file.
2. Use javah to generate a .h file from the .java file.
3. Implement the functions prototyped in the .h in a .cpp file.
4. Compile the .cpp file into a .dll (or .so) file.
5. Use java to run the .class file which loads the .dll (or .so) file.
I wouldn't know how to do all this with Visual Studio. However, with Make,
it's the simplest thing on the entire planet.
Since I created a template Makefile to do all this, whenever I work on a new
program, all I need to do is change the first line from:
TARGET = HelloWorld
to:
TARGET = IntArrayTest
and I'm done. It, quite literally, takes me 3 seconds. Two if I hurry. :)
I wouldn't know how to do this with Visual Studio.
But other than this, I often do use the the VS IDE.
I also use the command line stuff for little test or proof of concept
programs, like testing out the behavior of a particular function. I can
usually have the program written and compiled using command line tools by the
time I tell VS where to put a new project. Well... not quite. But
honestly, this isn't too much of a hyperbole. :)
But for larger projects on Microsoft Windows, I often do use the IDE.
Pete
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Command line compiler
- From: Peter Jay Salzman
- Re: Command line compiler
- From: Jonathan Wood
- Re: Command line compiler
- From: Joseph M . Newcomer
- Re: Command line compiler
- From: Peter
- Re: Command line compiler
- From: Jonathan Wood
- Re: Command line compiler
- From: Peter
- Command line compiler
- Prev by Date: Re: Command line compiler
- Next by Date: Re: DLL build error.
- Previous by thread: Re: Command line compiler
- Next by thread: Re: Command line compiler
- Index(es):
Relevant Pages
|