Closed GoogleCodeExporter closed 9 years ago
I've made the `options` element special in the sense that it refers to a
property name. So something like `options="cpp11"` would actually take the
compiler options from the `compiler.options.cpp11` property, that should be
added to the property files for ease-of-use, and passed with the
`-propertyfile` command option of JavaCPP for example. I made it this way
because compiler options differ between, for example, GCC and MSVC while we
tend to use the same set of options across classes and projects, so, it thought
it was a good idea to avoid duplication of code. I should add a better error
message than just throwing a NPE, I'll do that at least.
But then, if you're only interested in something that works for the purpose of
a build, I added a `-Xcompiler` option to the Builder, so calling `java -jar
javacpp.jar -Xcompiler -std=c++0x ...` also works. This may be what you are
looking for?
Original comment by samuel.a...@gmail.com
on 18 Sep 2012 at 2:17
Thank you for your fast reply!
So as you described I created a properties file, and added the compiler
parameters there like this:
$ cat javacpp.properties
compiler.options.gcc11=-std=c++0x
Added the -propertyfile "javacpp.properties" to the javacpp invocation, and
added options="gcc11" to the @Platform annotation.
This way the compilation works fine with the released v0.2.
Anyhow, a more descriptive error message would be great! :)
Thanks again!
Original comment by buciena...@gmail.com
on 18 Sep 2012 at 10:13
I've added better handling in JavaCPP 0.3. Let me know if it's still confusing
for some reason, thanks!
Original comment by samuel.a...@gmail.com
on 5 Nov 2012 at 11:19
Original issue reported on code.google.com by
buciena...@gmail.com
on 17 Sep 2012 at 3:11