Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I have a strange, but common question. How to compile Qt4 apps using gcc? I know that Qt uses g++ compiler by default, but I'd like to do a ...
  1. #1
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549

    gcc issue

    Hello,


    I have a strange, but common question. How to compile Qt4 apps using gcc?

    I know that Qt uses g++ compiler by default, but I'd like to do a compilation with gcc. Could I just re-edit a qmake generated makefile and replacing g++ with gcc?

    I wanna do this because I'm mixing my C program with Qt4.

  2. #2
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    No, I don't think using gcc (for C language) to link to QT3/4/whatever is possible.
    QT is natively C++ - so a C compiler (linker to be precise) cannot handle the name-mangling and linking.

    However, g++ can compile normal C code - afterall C++ is a superset of C

    HTH
    The Unforgiven
    Registered Linux User #358564

  3. #3
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549
    well, I managed with that.
    Qmake makes a mekafile for comiling C code too.


    SOLVED

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...