Adding librairies at the compilation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
seby2
Posts: 8
Joined: Wed Sep 12, 2018 8:51 am

Adding librairies at the compilation

Post 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
Yvan Fournier
Posts: 4074
Joined: Mon Feb 20, 2012 3:25 pm

Re: Adding librairies at the compilation

Post 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
seby2
Posts: 8
Joined: Wed Sep 12, 2018 8:51 am

Re: Adding librairies at the compilation

Post 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
Post Reply