Page 1 of 1

Adding librairies at the compilation

Posted: Thu Oct 25, 2018 10:36 am
by seby2
Hello,

I am trying to add some librairies at the compilation by using cs_user_script.py file.
In this file, I tried to replace
domain.compile_libs = None
by
domain.compile_libs = "-lmedcoupling"
But it does not seem to work.

What is the correct syntax to add librairies in this file ?
Is that the simplest way to do this ?
Thank you.

Regards,
Seb

Re: Adding librairies at the compilation

Posted: Thu Oct 25, 2018 3:46 pm
by Yvan Fournier
Hello,

Could you post your error message ? You syntax seems ok, but may be missing other options (for example, you may need a library search path using "-L" and possible also "-rpath" instead of simply -lmedcoupling).

Best regards,

Yvan

Re: Adding librairies at the compilation

Posted: Mon Oct 29, 2018 8:56 am
by seby2
Hello,

I only modify domain.compile_libs in cs_user_script.py, nothing else.

I get the following errors during compilation :

cs_case_domain.RunCaseError: Compile or link error.
undefined reference to « ParaMEDMEM::DataArrayDouble::New() »

It works if I add the librairies directly in compilation options of Code_Saturne (for all users) but not if I use this user script. This is not a library problem. Maybe I use this script badly since the link is not done.

Regards,
Seb