I was checking my repo [occt.nim](https://github.com/mantielero/occt.nim) and 
some examples that used to work (or that is what I believe), now they stopped 
working.

For instance: 
[gp_06_ax1.nim](https://github.com/mantielero/occt.nim/blob/main/examples/01%20Foundation/gp_06_ax1.nim)
 when compiled and run:
    
    
    $ nim cpp -r gp_06_ax1
    ...
    /home/jose/.cache/nim/gp_06_ax1_d/@mgp_06_ax1.nim.cpp:52:48: error: 'T1_' 
was not declared in this scope
       52 | N_LIB_PRIVATE gp_Ax1 axis1__gp95485495ax49_u38(T1_, T2_);
          |                                                ^~~
    /home/jose/.cache/nim/gp_06_ax1_d/@mgp_06_ax1.nim.cpp:52:53: error: 'T2_' 
was not declared in this scope
       52 | N_LIB_PRIVATE gp_Ax1 axis1__gp95485495ax49_u38(T1_, T2_);
          |                                                     ^~~
    Error: execution of an external compiler program 'g++ -c -std=gnu++17 
-funsigned-char  -w -fmax-errors=3 -fpermissive -pthread 
-I/usr/include/opencascade/   -I/home/jose/.choosenim/toolchains/nim-2.0.2/lib 
-I'/home/jose/Descargas/occt/occt.nim-main/examples/01 Foundation' -o 
/home/jose/.cache/nim/gp_06_ax1_d/@mgp_06_ax1.nim.cpp.o 
/home/jose/.cache/nim/gp_06_ax1_d/@mgp_06_ax1.nim.cpp' failed with exit code: 1
    
    
    Run

where:

  * [@mgp_06_ax1.nim.cpp](https://pastebin.com/dQaV9XNG)
  * 
[ax1](https://github.com/mantielero/occt.nim/blob/main/src/wrapper/gp/gp_ax1.nim#L24_L25)
 definition



In fact, I am having some extrange behaviours with constructors. For example:

1\. 
[geom_01_cartesian_point.nim](https://github.com/mantielero/occt.nim/blob/main/examples/02%20Modeling%20Data/geom_01_cartesian_point.nim)
    
    
    $ nim cpp -r geom_01_cartesian_point.nim
    ...
    
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp:154:116:
 error: expression cannot be used as a function
      154 |         nimln_(22);     result = 
opencascade::handle<Geom_CartesianPoint>((new Geom_CartesianPoint(((float) 
(x_p0))((float) (y_p1))((float) (z_p2)))));
          |                                                                     
                               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
    Error: execution of an external compiler program 'g++ -c -std=gnu++17 
-funsigned-char  -w -fmax-errors=3 -fpermissive -pthread 
-I/usr/include/opencascade/   -I/home/jose/.choosenim/toolchains/nim-2.0.2/lib 
-I'/home/jose/Descargas/occt/occt.nim-main/examples/02 Modeling Data' -o 
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp.o
 
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp'
 failed with exit code: 1
    
    
    Run

with:

  * 
[newHandle](https://github.com/mantielero/occt.nim/blob/71736681a0ec9a6930c1cc38dc8b6a9e9f023a06/src/wrapper/standard/standard_handle.nim#L45-L46)
 definition
  * 
[cnew](https://github.com/mantielero/occt.nim/blob/71736681a0ec9a6930c1cc38dc8b6a9e9f023a06/src/wrapper/cnew.nim)
 definition
  * 
[newGeomCartesianPoint](https://github.com/mantielero/occt.nim/blob/71736681a0ec9a6930c1cc38dc8b6a9e9f023a06/src/wrapper/geom/geom_cartesianpoint.nim#L30_L31)
 definition



2\. 
[geom_02_cartesian_point.nim](https://github.com/mantielero/occt.nim/blob/main/examples/02%20Modeling%20Data/geom_02_cartesian_point.nim)
    
    
    $ nim cpp -r geom_02_cartesian_point
    ...
    
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp:
 In function 'TY__A0iXJcRd9c6f9bJrwkHu9cprg 
newPnt__geom95485095cartesian95point_u3(NI, NF, NI)':
    
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp:154:116:
 error: expression cannot be used as a function
      154 |         nimln_(22);     result = 
opencascade::handle<Geom_CartesianPoint>((new Geom_CartesianPoint(((float) 
(x_p0))((float) (y_p1))((float) (z_p2)))));
          |                                                                     
                               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
    Error: execution of an external compiler program 'g++ -c -std=gnu++17 
-funsigned-char  -w -fmax-errors=3 -fpermissive -pthread 
-I/usr/include/opencascade/   -I/home/jose/.choosenim/toolchains/nim-2.0.2/lib 
-I'/home/jose/Descargas/occt/occt.nim-main/examples/02 Modeling Data' -o 
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp.o
 
/home/jose/.cache/nim/geom_02_cartesian_point_d/@m..@s..@ssrc@slib@sgeom@scartesian_point.nim.cpp'
 failed with exit code: 1
    
    
    Run

It looks like the commas were missing in the constructor.

I am on ArchLinux using Nim v2.0.2.

Reply via email to