<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1480306326939_7449">Hello,<br></div><div id="yui_3_16_0_1_1480306326939_7451"><br id="yui_3_16_0_1_1480306326939_7452"></div><div id="yui_3_16_0_1_1480306326939_7453">I'm trying to create a simple Gambit wrapper for the opencv library.  Opencv is written in C++ so I tried to build Gambit with the --enable-cplusplus flag.  I was hoping this would be easier than trying to build a Gambit wrapper around a C wrapper around opencv, but I haven't been able to Gambit to build with the C++ option.  I have no problems building Gambit with gcc, but g++ gives the errors below.</div><div id="yui_3_16_0_1_1480306326939_7454"><br id="yui_3_16_0_1_1480306326939_7455"></div><div id="yui_3_16_0_1_1480306326939_7456">Is there more to a C++ build that I may be missing?  Is there an easier way to wrap a C++ library?  I included my compiler versions below as well.</div><div id="yui_3_16_0_1_1480306326939_7457"><br id="yui_3_16_0_1_1480306326939_7458"></div><div id="yui_3_16_0_1_1480306326939_7459">Thanks for you help,</div><div id="yui_3_16_0_1_1480306326939_7460">Bob</div><div id="yui_3_16_0_1_1480306326939_7461"><br id="yui_3_16_0_1_1480306326939_7462"></div><div id="yui_3_16_0_1_1480306326939_7463"><br id="yui_3_16_0_1_1480306326939_7464"></div><div id="yui_3_16_0_1_1480306326939_7465"># configuring with just the --enable-cplusplus flag gives the errors below:</div><div id="yui_3_16_0_1_1480306326939_7466"># ./configure --enable-cplusplus</div><div id="yui_3_16_0_1_1480306326939_7467"><br id="yui_3_16_0_1_1480306326939_7468"></div><div id="yui_3_16_0_1_1480306326939_7469">bob@bob-Gazelle:~/GambitSchemeSourceRepo/gambit$ make -j8 from-scratch</div><div id="yui_3_16_0_1_1480306326939_7470">...</div><div id="yui_3_16_0_1_1480306326939_7471">libgambitgsc.a(_source.o): In function `___H_c_23__2a__2a_readtable_2d_string_2d_convert_2d_case_21_':</div><div id="yui_3_16_0_1_1480306326939_7472">_source.c:(.text+0xde0b): undefined reference to `___towupper'</div><div id="yui_3_16_0_1_1480306326939_7473">_source.c:(.text+0xdeca): undefined reference to `___towlower'</div><div id="yui_3_16_0_1_1480306326939_7474">libgambitgsc.a(_source.o): In function `___H_c_23__2a__2a_readtable_2d_convert_2d_case':</div><div id="yui_3_16_0_1_1480306326939_7475">_source.c:(.text+0xdfc9): undefined reference to `___towupper'</div><div id="yui_3_16_0_1_1480306326939_7476">_source.c:(.text+0xdfdd): undefined reference to `___towlower'</div><div id="yui_3_16_0_1_1480306326939_7477">libgambitgsc.a(_front.o): In function `___H_c_23_valid_2d_module_2d_name_3f_':</div><div id="yui_3_16_0_1_1480306326939_7478">_front.c:(.text+0x268c1): undefined reference to `___iswspace'</div><div id="yui_3_16_0_1_1480306326939_7479">libgambitgsc.a(_asm.o): In function `___H___asm_23_asm_2d_float_2d__3e_exact_2d_exponential_2d_format':</div><div id="yui_3_16_0_1_1480306326939_7480">_asm.c:(.text+0x24b24): undefined reference to `___isfinite'</div><div id="yui_3_16_0_1_1480306326939_7481">_asm.c:(.text+0x24b37): undefined reference to `___trunc'</div><div id="yui_3_16_0_1_1480306326939_7482">collect2: error: ld returned 1 exit status</div><div id="yui_3_16_0_1_1480306326939_7483">make[2]: *** [gsc] Error 1</div><div id="yui_3_16_0_1_1480306326939_7484">make[1]: *** [all-recursive] Error 1</div><div id="yui_3_16_0_1_1480306326939_7485">make: *** [from-scratch] Error 2</div><div id="yui_3_16_0_1_1480306326939_7486"><br id="yui_3_16_0_1_1480306326939_7487"></div><div id="yui_3_16_0_1_1480306326939_7488"><br id="yui_3_16_0_1_1480306326939_7489"></div><div id="yui_3_16_0_1_1480306326939_7490"><br id="yui_3_16_0_1_1480306326939_7491"></div><div id="yui_3_16_0_1_1480306326939_7492"># configuring with my typical options plus --enable-cplusplus gives a different</div><div id="yui_3_16_0_1_1480306326939_7493"># set of errors</div><div id="yui_3_16_0_1_1480306326939_7494">#./configure --enable-single-host --enable-cplusplus --enable-c-opt --enable-gcc-opts --enable-openssl</div><div id="yui_3_16_0_1_1480306326939_7495"><br id="yui_3_16_0_1_1480306326939_7496"></div><div id="yui_3_16_0_1_1480306326939_7497">bob@bob-Gazelle:~/GambitSchemeSourceRepo/gambit$ make -j8 from-scratch</div><div id="yui_3_16_0_1_1480306326939_7498">...</div><div id="yui_3_16_0_1_1480306326939_7499">os_io.c: In function ‘long int ___release_rc_tls_context(void*)’:</div><div id="yui_3_16_0_1_1480306326939_7500">os_io.c:3705:23: error: invalid conversion from ‘void*’ to ‘___tls_context* {aka</div><div id="yui_3_16_0_1_1480306326939_7501"> ___tls_context_t*}’ [-fpermissive]</div><div id="yui_3_16_0_1_1480306326939_7502">   ___tls_context *c = x;</div><div id="yui_3_16_0_1_1480306326939_7503">                       ^</div><div id="yui_3_16_0_1_1480306326939_7504">os_io.c: In function ‘long int ___os_make_tls_context(long int, long int, long i</div><div id="yui_3_16_0_1_1480306326939_7505">nt, long int, long int, long int, long int)’:</div><div id="yui_3_16_0_1_1480306326939_7506">os_io.c:3911:20: error: invalid conversion from ‘void*’ to ‘void**’ [-fpermissiv</div><div id="yui_3_16_0_1_1480306326939_7507">e]</div><div id="yui_3_16_0_1_1480306326939_7508">                   0)</div><div id="yui_3_16_0_1_1480306326939_7509">                    ^</div><div id="yui_3_16_0_1_1480306326939_7510">In file included from os_io.c:12:0:</div><div id="yui_3_16_0_1_1480306326939_7511">../include/gambit.h:10260:23: note:   initializing argument 2 of ‘long int ___SC</div><div id="yui_3_16_0_1_1480306326939_7512">MOBJ_to_STRING(long int, void**, int, int, int)’</div><div id="yui_3_16_0_1_1480306326939_7513"> ___IMP_FUNC(___SCMOBJ,___SCMOBJ_to_STRING)</div><div id="yui_3_16_0_1_1480306326939_7514">                       ^</div><div id="yui_3_16_0_1_1480306326939_7515">../include/gambit.h:1554:43: note: in definition of macro ‘___IMP_FUNC’</div><div id="yui_3_16_0_1_1480306326939_7516"> #define ___IMP_FUNC(type,name)extern type name</div><div id="yui_3_16_0_1_1480306326939_7517">                                           ^</div><div id="yui_3_16_0_1_1480306326939_7518">os_io.c:3919:20: error: invalid conversion from ‘void*’ to ‘void**’ [-fpermissiv</div><div id="yui_3_16_0_1_1480306326939_7519">e]</div><div id="yui_3_16_0_1_1480306326939_7520">                   0)</div><div id="yui_3_16_0_1_1480306326939_7521">                    ^</div><div id="yui_3_16_0_1_1480306326939_7522">In file included from os_io.c:12:0:</div><div id="yui_3_16_0_1_1480306326939_7523">../include/gambit.h:10260:23: note:   initializing argument 2 of ‘long int ___SC</div><div id="yui_3_16_0_1_1480306326939_7524">MOBJ_to_STRING(long int, void**, int, int, int)’</div><div id="yui_3_16_0_1_1480306326939_7525"> ___IMP_FUNC(___SCMOBJ,___SCMOBJ_to_STRING)</div><div id="yui_3_16_0_1_1480306326939_7526">                       ^</div><div id="yui_3_16_0_1_1480306326939_7527">../include/gambit.h:1554:43: note: in definition of macro ‘___IMP_FUNC’</div><div id="yui_3_16_0_1_1480306326939_7528"> #define ___IMP_FUNC(type,name)extern type name</div><div id="yui_3_16_0_1_1480306326939_7529">                                           ^</div><div id="yui_3_16_0_1_1480306326939_7530">os_io.c:3927:20: error: invalid conversion from ‘void*’ to ‘void**’ [-fpermissiv</div><div id="yui_3_16_0_1_1480306326939_7531">e]</div><div id="yui_3_16_0_1_1480306326939_7532">                   0)</div><div id="yui_3_16_0_1_1480306326939_7533">                    ^</div><div id="yui_3_16_0_1_1480306326939_7534">In file included from os_io.c:12:0:</div><div id="yui_3_16_0_1_1480306326939_7535">../include/gambit.h:10260:23: note:   initializing argument 2 of ‘long int ___SC</div><div id="yui_3_16_0_1_1480306326939_7536">MOBJ_to_STRING(long int, void**, int, int, int)’</div><div id="yui_3_16_0_1_1480306326939_7537"> ___IMP_FUNC(___SCMOBJ,___SCMOBJ_to_STRING)</div><div id="yui_3_16_0_1_1480306326939_7538">                       ^</div><div id="yui_3_16_0_1_1480306326939_7539">../include/gambit.h:1554:43: note: in definition of macro ‘___IMP_FUNC’</div><div id="yui_3_16_0_1_1480306326939_7540"> #define ___IMP_FUNC(type,name)extern type name</div><div id="yui_3_16_0_1_1480306326939_7541">                                           ^</div><div id="yui_3_16_0_1_1480306326939_7542">In file included from os_io.c:12:0:</div><div id="yui_3_16_0_1_1480306326939_7543">../include/gambit.h:10260:23: note:   initializing argument 2 of ‘long int ___SC</div><div id="yui_3_16_0_1_1480306326939_7544">MOBJ_to_STRING(long int, void**, int, int, int)’</div><div id="yui_3_16_0_1_1480306326939_7545"> ___IMP_FUNC(___SCMOBJ,___SCMOBJ_to_STRING)</div><div id="yui_3_16_0_1_1480306326939_7546">                       ^</div><div id="yui_3_16_0_1_1480306326939_7547">../include/gambit.h:1554:43: note: in definition of macro ‘___IMP_FUNC’</div><div id="yui_3_16_0_1_1480306326939_7548"> #define ___IMP_FUNC(type,name)extern type name</div><div id="yui_3_16_0_1_1480306326939_7549">                                           ^</div><div id="yui_3_16_0_1_1480306326939_7550">os_io.c:3941:20: error: invalid conversion from ‘void*’ to ‘void**’ [-fpermissiv</div><div id="yui_3_16_0_1_1480306326939_7551">e]</div><div id="yui_3_16_0_1_1480306326939_7552">                   0)</div><div id="yui_3_16_0_1_1480306326939_7553">                    ^</div><div id="yui_3_16_0_1_1480306326939_7554">In file included from os_io.c:12:0:</div><div id="yui_3_16_0_1_1480306326939_7555">../include/gambit.h:10260:23: note:   initializing argument 2 of ‘long int ___SC</div><div id="yui_3_16_0_1_1480306326939_7556">MOBJ_to_STRING(long int, void**, int, int, int)’</div><div id="yui_3_16_0_1_1480306326939_7557"> ___IMP_FUNC(___SCMOBJ,___SCMOBJ_to_STRING)</div><div id="yui_3_16_0_1_1480306326939_7558">                       ^</div><div id="yui_3_16_0_1_1480306326939_7559">../include/gambit.h:1554:43: note: in definition of macro ‘___IMP_FUNC’</div><div id="yui_3_16_0_1_1480306326939_7560"> #define ___IMP_FUNC(type,name)extern type name</div><div id="yui_3_16_0_1_1480306326939_7561">                                           ^</div><div id="yui_3_16_0_1_1480306326939_7562">make[2]: *** [os_io.o] Error 1</div><div id="yui_3_16_0_1_1480306326939_7563">make[2]: *** Waiting for unfinished jobs....</div><div id="yui_3_16_0_1_1480306326939_7564">make[1]: *** [all-recursive] Error 1</div><div id="yui_3_16_0_1_1480306326939_7565">make: *** [from-scratch] Error 2</div><div id="yui_3_16_0_1_1480306326939_7566"><br id="yui_3_16_0_1_1480306326939_7567"></div><div id="yui_3_16_0_1_1480306326939_7568"><br id="yui_3_16_0_1_1480306326939_7569"></div><div id="yui_3_16_0_1_1480306326939_7570">## compiler versions, in case that's helpful</div><div id="yui_3_16_0_1_1480306326939_7571"><br id="yui_3_16_0_1_1480306326939_7572"></div><div id="yui_3_16_0_1_1480306326939_7573"># gcc -v</div><div id="yui_3_16_0_1_1480306326939_7574">Using built-in specs.</div><div id="yui_3_16_0_1_1480306326939_7575">COLLECT_GCC=gcc</div><div id="yui_3_16_0_1_1480306326939_7576">COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper</div><div id="yui_3_16_0_1_1480306326939_7577">Target: x86_64-linux-gnu</div><div id="yui_3_16_0_1_1480306326939_7578">Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu</div><div id="yui_3_16_0_1_1480306326939_7579">Thread model: posix</div><div id="yui_3_16_0_1_1480306326939_7580">gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) </div><div id="yui_3_16_0_1_1480306326939_7581"><br id="yui_3_16_0_1_1480306326939_7582"></div><div id="yui_3_16_0_1_1480306326939_7583"><br id="yui_3_16_0_1_1480306326939_7584"></div><div id="yui_3_16_0_1_1480306326939_7585"># g++ -v</div><div id="yui_3_16_0_1_1480306326939_7586">Using built-in specs.</div><div id="yui_3_16_0_1_1480306326939_7587">COLLECT_GCC=g++</div><div id="yui_3_16_0_1_1480306326939_7588">COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper</div><div id="yui_3_16_0_1_1480306326939_7589">Target: x86_64-linux-gnu</div><div id="yui_3_16_0_1_1480306326939_7590">Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu</div><div id="yui_3_16_0_1_1480306326939_7591">Thread model: posix</div><div id="yui_3_16_0_1_1480306326939_7592">gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) </div><div dir="ltr" id="yui_3_16_0_1_1480306326939_7593"><br id="yui_3_16_0_1_1480306326939_7594"></div></div></body></html>