Book a Demo

Author Topic: Importing C++/Qt Code in EA 7.1(Professional)  (Read 3755 times)

coderr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Importing C++/Qt Code in EA 7.1(Professional)
« on: March 15, 2011, 09:59:32 pm »
Hi!

Whenever i try to import simple C++-header files with classes derived from QObject (from the Qt C++ Framework), i get an error
"unexpected symbol: QObject
unexpected symbol: {"
at the beggining of the class declaration ("class MyClass: public QObject {").
The classes aren't imported afterwards. Also, no dialog is popping up, asking me what to do with classes it couldn't find (i selected "prompt for action" in the import dialog), so i guess, EA doesn't even notice that QObject is a class?

Is there a way to make EA import my classes somehow?

Thanks in advance.

sincerely

coderr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Importing C++/Qt Code in EA 7.1(Professional)
« Reply #1 on: March 16, 2011, 10:34:02 pm »
ok sorry, the issue is solved and it was all my fault ...
those classes are exportet from a lib, hence they all have a "MYLIB_EXPORT" macro in their declaration.
i added this to the language macros once, but somehow EA didn't store it.
i didn't check it again - until now -> added it again -> importet my header directory again -> works fine. :-)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Importing C++/Qt Code in EA 7.1(Professional)
« Reply #2 on: March 17, 2011, 08:29:06 am »
Glad to hear it's working.

Just wanted to say that you aren't being prompted (from memory) because of the parse error.  EA ignores classes missing from files with parse errors because it can't tell if they were actually there.