Menu

#10 Error when compiling

v1.0 (example)
open
nobody
None
5
2015-02-15
2015-02-14
Bob
No

Hi

I am trying to compile and use swIMP on Ubuntu and also Windows using MinGW. In both cases, I get the following error:

coin_wrap.cxx:11644:57: error: invalid conversion from 'int' to 'jint {aka lon
g int}' [-fpermissive]
jenv->ReleaseIntArrayElements(jarg2, arg3, JNI_ABORT);
^
In file included from coin_wrap.cxx:159:0:
c:\mingw\include\jni.h:1709:10: error: initializing argument 2 of 'void JNIEnv
_::ReleaseIntArrayElements(jintArray, jint
, jint)' [-fpermissive]
void ReleaseIntArrayElements(jintArray array,
^
make[3]: [libswIMP_la-coin_wrap.lo] Error 1
make[3]: Leaving directory /c/swimp-0.9.1/iface' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/c/swimp-0.9.1/iface'
make[1]:
[all-recursive] Error 1
make[1]: Leaving directory `/c/swimp-0.9.1'
make: *** [all] Error 2

actually there are lots of errors of this kind. I just posted the last error. (All in the same file (coin_wrap.cxx).

Would you please help?

Thanks

Bob

Related

Support Requests: #10

Discussion

  • Bob

    Bob - 2015-02-15

    actually it is just windows

     
    • combean

      combean - 2015-02-18

      Hi Bob,

      to be honest, I haven't much experience with Windows compilers. As a
      simple first attempt to resolve this, I would try to compile with
      -fpermissive (as indicated by the error message). A conversion from int
      to long int does not look problematic at all and I am surprised that the
      compiler complains about it. You can add -fpermissive to the compiler
      flags by adding it to the CXXFLAGS given to ./configure.

      I hope that helps.

      Cheers,

      Thomas

      Am 15.02.2015 um 05:07 schrieb Bob:

      actually it is just windows


      *[support-requests:#10]
      http://sourceforge.net/p/swimp/support-requests/10 Error when
      compiling *

      Status: open
      Group: v1.0 (example)
      Created: Sat Feb 14, 2015 09:45 PM UTC by Bob
      Last Updated: Sat Feb 14, 2015 09:45 PM UTC
      Owner: nobody

      Hi

      I am trying to compile and use swIMP on Ubuntu and also Windows using
      MinGW. In both cases, I get the following error:

      coin_wrap.cxx:11644:57: error: invalid conversion from 'int/' to
      'jint/ {aka lon
      g int/}' [-fpermissive]
      jenv->ReleaseIntArrayElements(jarg2, arg3, JNI_ABORT);
      ^
      In file included from coin_wrap.cxx:159:0:
      c:\mingw\include\jni.h:1709:10: error: initializing argument 2 of
      'void JNIEnv
      _::ReleaseIntArrayElements(jintArray, jint/, jint)' [-fpermissive]
      void ReleaseIntArrayElements(jintArray array,
      ^
      make[3]: */[libswIMP_la-coin_wrap.lo] Error 1
      make[3]: Leaving directory |/c/swimp-0.9.1/iface' make[2]:
      [all-recursive] Error 1 make[2]: Leaving directory|/c/swimp-0.9.1/iface'
      make[1]: /* [all-recursive] Error 1
      make[1]: Leaving directory `/c/swimp-0.9.1'
      make:
      [all] Error 2

      actually there are lots of errors of this kind. I just posted the last
      error. (All in the same file (coin_wrap.cxx).

      Would you please help?

      Thanks

      Bob


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/swimp/support-requests/10/
      https://sourceforge.net/p/swimp/support-requests/10

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions

       

      Related

      Support Requests: #10


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.