Quoting Roy Stogner <[EMAIL PROTECTED]>:
| out-of-date Makefile dependencies
You were right, there was some conflict between libraries. This is the
script I used to create an intermediate library on example 0 :
___________________________________________
c++ -fPIC -c ex0.C -o ex0.o
c++ -shared -Wl,-soname,libex0.so -o libex0.so.1.0.1 ex0.o
`libmesh-config --cxxflags --include --ldflags`
sudo chmod 777 libex0.so.1.0.1
sudo mv *so* /usr/lib/
sudo ldconfig
c++ -o ex0 -L. -lex0
./ex0
___________________________________________
This way, the example runs perfectly.
By now, the objective is to call this or another library from R front end.
I truely think it's possible to make a link between these tools but
there is a constraint with libmesh::init(argc, argv). This last
function is now deprecated but the initialisation problem remains the
same.
R extension with C or C++ code could be declared this way :
___________________________________________
double foo(double A, double B) { return A+B; };
extern "C" {
void foo_R(double* output, double* A, double* B){
*output = foo(*A,*B);
};
}
___________________________________________
With non libmesh code, this is fine
The question is :
How and where should libmesh::init(argc, argv) be called if foo
depends on libMesh ?
May be argc and argv could be fakes.
At the moment the result is a segmentation fault.
If someone has managed to build a bridge between libMesh and R,
Thanks,
Maxime
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users