writing c++ programs/API for .net and java

J

jakester

I wanted to write a C++ API that can be used in both .NET and Java. Is
this possible? Where would I start? My .NET and Java programming
skills are good and my C++ is okay (lost in memory). I know that Java
can make calls to native code using JNI. .NET also provides utils and
wrappers for native code to be used (at least if you use ATL).

However, what factors do I need to consider (i.e. GCC vs Microsoft C+
+) when writing my C++ code so that .NET and Java can use the code? My
ultimate goal is to have .NET and Java use the C++ API, and allow the
use of the C++ API on Linux and Microsoft platform.

I do not want to go through webservices to interoperate .NET and Java
for a variety of reasons.
 
V

Victor Bazarov

jakester said:
I wanted to write a C++ API that can be used in both .NET and Java. Is
this possible? Where would I start? My .NET and Java programming
skills are good and my C++ is okay (lost in memory). I know that Java
can make calls to native code using JNI. .NET also provides utils and
wrappers for native code to be used (at least if you use ATL).

However, what factors do I need to consider (i.e. GCC vs Microsoft C+
+) when writing my C++ code so that .NET and Java can use the code? My
ultimate goal is to have .NET and Java use the C++ API, and allow the
use of the C++ API on Linux and Microsoft platform.

I do not want to go through webservices to interoperate .NET and Java
for a variety of reasons.

Write a C++ API that can be used in C++. Then write .NET and JNI
wrappers around them. You get 3.

Consider asking in a Java newsgroup about JNI and in .NET newsgroup
about their requirements. Neither technology is defined in the C++
language Standard, and comp.lang.c++ is not the right place to talk
about those IMO.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top