C++ in IDL [message #44207] |
Mon, 30 May 2005 13:30 |
Tim-Oliver Husser
Messages: 2 Registered: May 2005
|
Junior Member |
|
|
Hi,
this is my first posting here, so let me just say hello. :-)
I've got some small problem with IDL 6.0 and it would give me great
pleasure, if someone could help me with that.
There is some heavy computation I have to do within IDL (running a
genetic algorithm, so it's really pure number crunching) and I was
thinking about porting that algorithm to C/C++ to call it via
call_external. I assume, that the code would be much faster in C/C++,
wouldn't it?
Now my problem: I do not really want to use ANSI C (I never ever want
to use malloc again), and anyway C++ is my favorite programming
language. But I cannot compile C++ code with make_dll and my
experience in Linux programming is not that good (I'm just a windows
programmer), so I do not know, how to compile the C++ code correctly.
I tried something like this:
g++ -fPIC -I"path/to/idl/includes" -L"path/to/idl/libs" -lidl
-D_REENTRANT test.cpp
But there seem to be missing a lot of libraries. I think that I can
figure out by myself, which libraries I have to link to, but I do not
really want to do this, before I know for sure, that it is really
possible to call C++ libraries with IDL. I just don't want to do some
useless work...
All the C++ code is enclosed in an 'extern "C" { }', so that should
not be a problem I think.
Has anyone ever tried to do something like this and could help me?
thx,
Tim-Oliver
|
|
|