You are not logged in.

1

Tuesday, July 19th 2011, 3:05pm

How to import Qt class into C++ project?

Goodmorning everybody,

I'm trying to import qt written class into a C++ project.

Now the problem is that Qt exports classes by using the Key word

Q_DECL_EXPORT

and C++ imports classes by using __declspec (dllimport)

How is possible to match both languages??

Now the compiler arises a problem such as this :
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [src/RFM_plot_import.o] Error 1

Could you help me?? ?(
Thanks in advance!
Andrea

bolt18_80

Intermediate

  • "bolt18_80" is male

Posts: 186

Location: Ohio, US

Occupation: Programmer/Analyst

  • Send private message

2

Thursday, July 28th 2011, 5:36pm

Are you trying to modify the original library to just use standard C++ or are you expecting to drop the Qt library you've built into your existing C++ application? Please post the code, project file, Makefile, and any other relevant commands and information so we can help you. If you are hand-writing a makefile, I suspect that you have an error in that file for your new project. The errors you are receiving are shell syntax errors when trying to execute a command (probably the gcc or g++ command). But we need all of that information to help you.

Thanks,
--
Chris
Christopher Springer
Programmer/Analyst
NBEC/NWOCA - Ohio SSDT
Website: http://www.moderncpp.org
cspringer@moderncpp.org

  • "VivianGarcia" is female

Posts: 1

Location: 5376 W 16th Ave, Hialeah, FL ,33012

Occupation: Telecommunication network planner

  • Send private message

3

Saturday, September 10th 2011, 8:44am

Reply

[font='&quot']Use your Pro file to include your header files and libraries...[/font]
[font='&quot']For Header Files:[/font]
[font='&quot']INCLUDEPATH += "C:\Source\HeaderFiles"[/font]
[font='&quot']For libraries:[/font]
[font='&quot']LIBS += "C:\Source\Libraries\MyLib.lib"[/font]
[font='&quot']Include those header files while using the functions from the libraries.[/font]
[font='&quot']This works for me... Try it...[/font]

:love: