Book a Demo

Author Topic: Generating C++code from class diagram causes error  (Read 12748 times)

Elvys

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Generating C++code from class diagram causes error
« on: August 26, 2014, 05:08:16 pm »
Hallo there,

I'm trying to generate C++-Code from a class modeled with EA10.

The path where the code has to be generated has a pattern like

D:\_Projects\Project123\Mod123\

Well, when I click on "Generate" a dialog appears indicating that

An error occurred opening the file:
D:\_Projects\Project123\Mod123\D:\_Projects\Project123\Mod123\File.cpp

The corresponding h-file is created in the right folder without problems.

For tests I have created a dummy-project on my desktop.

I modeled a class (with a few dummy methods) and tried to generate the code.

I was surprised to see the dialog with the message:

An error occurred opening the file:
C:\Users\elvys\Desktop\D:\_Projects\Project123\Mod123\Class1.cpp

As you can see the path of the project I was modelling first is somewhere saved.

The same model can generate java code without problems.

About my system:
OS: Win7Pro SP1
CPU: Intel Core i7 2640M@2,8GHz

License type: Floating (But at the moment I’m the only one using EA because the other developers are on holiday).

I hope you can help me.

Thank you in advance

Elvys

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating C++code from class diagram causes e
« Reply #1 on: August 28, 2014, 08:40:07 am »
What is the value of Tools | Options | C++ | Source Path?

I'm expecting something like D:\_Projects\...

The option expects a relative path to the location of the header files. (The default is .\)

Elvys

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Generating C++code from class diagram causes e
« Reply #2 on: September 02, 2014, 04:43:05 pm »
Halo Simon,

sorry for the delay: I expected a notification that never came.   :'(

You were absolutelly right - The path was configured with the D:\...-directory.

This makes my day.  ;)

Thanks again

Elvys