Recently , I have wanted to embed c++ code in gambit just like you can do with c code. Not having any success building the windows GNU version by passing -enable-cplusplus to ./configure, I switched to linux, built gambit, and discovered that I could easily embed c++ code in c-declare forms.
(c-declare "using namespace std; public class Test : ....") Then I could use c++ methods from c-lambda forms, etc.
Now im switching back to windows. Since I have had no luck building gambit-c in windows when attempting to enable cplusplus, I have switched to attempting the same with visual c++. However I see no equivalent option in the visual c++ express .bat build file.
The compiler assumes that all of my files are c files, because they end with .c, so it signals an error when I attempt to compile code like
(c-declare "using namespace std; public class test: ...")
Has anyone had any success in embedding visual c++ code into their gambit-c apps?
Afficher les réponses par date
Add -TP (i.e. " -TP ") to your ld-options-prelude argument. It makes MSVC treat your .c file as a .cpp.
Mikael
2010/1/31 Seth Burleigh seth@tewebs.com
Recently , I have wanted to embed c++ code in gambit just like you can do with c code. Not having any success building the windows GNU version by passing –enable-cplusplus to ./configure, I switched to linux, built gambit, and discovered that I could easily embed c++ code in c-declare forms.
(c-declare “using namespace std; public class Test : ……….”) Then I could use c++ methods from c-lambda forms, etc.
Now im switching back to windows. Since I have had no luck building gambit-c in windows when attempting to enable cplusplus, I have switched to attempting the same with visual c++. However I see no equivalent option in the visual c++ express .bat build file.
The compiler assumes that all of my files are c files, because they end with .c, so it signals an error when I attempt to compile code like
(c-declare “using namespace std; public class test: …….”)
Has anyone had any success in embedding visual c++ code into their gambit-c apps?
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list