How to compile and install OPENCRG?

55 views
Skip to first unread message

yaoyiyao

unread,
Nov 15, 2022, 7:17:51 AM11/15/22
to ProjectChrono
Hello ,I want to use vehicle module and I choose ENABLE_OPENCRG in cmake, I download opencrg 1.1.2 ,but  I can't  provide the location of a local installation of OpenCRG, including the location of the headers, library, and  the location of the OpenCRG DLL.  1668514579777.jpg  Many thanks in advance

Freya the Goddess

unread,
Nov 15, 2022, 9:02:26 AM11/15/22
to yaoyiyao, ProjectChrono
Hi Yaoyiyao,

I have tried OpenCRG and want to share it how to include it as library for Project Chrono.
(I use custom Linux OS from BLFS book, you can adjust it with your own OS)

1. I downloaded it from this link:


2. Extract it, move it to the location you want it to be and rename it if you want, enter the directory and create the shared library, cd to \textbf{../OpenCRG/c-api/baseline/src} then type:
gcc -g -O -c *.c
gcc -shared -fPIC libOpenCRG.so *.c

3. Afterward, libOpenCRG.so is created and ready to be linked for your Project Chrono build later on, you may move the library to a more decent place like /opt/hamzstlib/lib

4. Now you can link the .so file to provide it for Chrono compiling / installation.

Le mar. 15 nov. 2022 à 19:17, yaoyiyao <yaoyiy...@gmail.com> a écrit :
Hello ,I want to use vehicle module and I choose ENABLE_OPENCRG in cmake, I download opencrg 1.1.2 ,but  I can't  provide the location of a local installation of OpenCRG, including the location of the headers, library, and  the location of the OpenCRG DLL.  1668514579777.jpg  Many thanks in advance

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/d9dbbcb5-1854-4596-847b-a0573596a585n%40googlegroups.com.


--
С наилучшими пожеланиями, Богиня Фрейя
Atenciosamente, Freya the Goddess
Meilleurs voeuxFreya the Goddess
Liebe Grüße, Freya the Goddess
Best wishes, Freya the Goddess
よろしくお願いします、Freya the Goddess
最好的祝福,Freya the Goddess
Matakwa mema, Freya the Goddess
مع أطيب التمنيات ، فريا الإلهة

yaoyiyao

unread,
Nov 15, 2022, 11:25:28 PM11/15/22
to ProjectChrono
Hi,
 I downloaded  OpenCRG from https://www.asam.net/standards/detail/opencrg/.( I use custom Win10 OS  )
I installed the C-compiler gcc on  computer and have set up a standard make environment on your computer.
then
Open a command line interpreter.
Change to the c-api directory.
Run make.
but failed.
1668572410712.jpg
Many thanks in advance.

Radu Serban

unread,
Nov 16, 2022, 5:15:33 PM11/16/22
to ProjectChrono

Yaoyiyao,

 

This appears to be some issue with your mingw32 make. 

Try using the solution provided by Freya by directly invoking the gcc compiler (no need really to use make for this simple case).

Alternatively, since you are on Windows, one possibility is to build the OpenCRG library using Visual Studio (the community edition is free). The code in OpenCRG’s c-api directory is quite simple, so it’s straightforward to set up a VS project to build it. 

 

--Radu

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of yaoyiyao
Sent: Wednesday, 16 November 2022 05:25
To: ProjectChrono <projec...@googlegroups.com>
Subject: Re: [chrono] How to compile and install OPENCRG?

 

Hi,

 I downloaded  OpenCRG from https://www.asam.net/standards/detail/opencrg/.( I use custom Win10 OS  )

I installed the C-compiler gcc on  computer and have set up a standard make environment on your computer.

then

Open a command line interpreter.

Change to the c-api directory.

Run make.

but failed.

Many thanks in advance.

On Tuesday, November 15, 2022 at 10:02:26 PM UTC+8 zaqhie...@gmail.com wrote:

Hi Yaoyiyao,

 

I have tried OpenCRG and want to share it how to include it as library for Project Chrono.

(I use custom Linux OS from BLFS book, you can adjust it with your own OS)

 

1. I downloaded it from this link:

 

 

2. Extract it, move it to the location you want it to be and rename it if you want, enter the directory and create the shared library, cd to \textbf{../OpenCRG/c-api/baseline/src} then type:

gcc -g -O -c *.c
gcc -shared -fPIC libOpenCRG.so *.c

 

3. Afterward, libOpenCRG.so is created and ready to be linked for your Project Chrono build later on, you may move the library to a more decent place like /opt/hamzstlib/lib

 

4. Now you can link the .so file to provide it for Chrono compiling / installation.

 

Le mar. 15 nov. 2022 à 19:17, yaoyiyao <yaoyiy...@gmail.com> a écrit :

Hello ,I want to use vehicle module and I choose ENABLE_OPENCRG in cmake, I download opencrg 1.1.2 ,but  I can't  provide the location of a local installation of OpenCRG, including the location of the headers, library, and  the location of the OpenCRG DLL.    Many thanks in advance

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/d9dbbcb5-1854-4596-847b-a0573596a585n%40googlegroups.com.



--

С наилучшими пожеланиями, Богиня Фрейя

Atenciosamente, Freya the Goddess

Meilleurs voeux, Freya the Goddess

Liebe Grüße, Freya the Goddess

Best wishes, Freya the Goddess

よろしくお願いします、Freya the Goddess

最好的祝福,Freya the Goddess

Matakwa mema, Freya the Goddess

مع أطيب التمنيات ، فريا الإلهة

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages