Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Windows Port: mingw32 issue (C and C++)

[Solved] Windows Port: mingw32 issue (C and C++)

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xtingray
    wrote on last edited by
    #1

    Hi everyone,

    Currently, I'm working on the Windows (7) port of my Qt project and I'm getting stuck with some message errors when I try to compile the first component (written in C) of my app:

    c:\qtsdk\mingw\bin..\lib\gcc\mingw32\4.4.0\include\c++\cstdlib:195:
    error: '::strtold' has not been declared
    c:\qtsdk\mingw\bin..\lib\gcc\mingw32\4.4.0\include\c++\cstdlib:215:
    error: '__gnu_cxx::strtold' has not been declared
    c:\qtsdk\mingw\bin..\lib\gcc\mingw32\4.4.0\include\c++\cwchar:245:
    error: '::wcstold' has not been declared
    c:\qtsdk\mingw\bin../lib/gcc/mingw32/4.4.0/include/c++/cwchar:262:
    error: '__gnu_cxx::wcstold' has not been declared

    Some context:

    • I have installed the Qt SDK with all its compounds
    • As plan B, I have installed Cygwin in other directory and I set it as toolchain for QtCreator, in case the Qt's gcc was missing a library.

    Do I have to do something else if my app includes a compound written in C? Any hint?

    Thanks!


    Qt Developer

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      Hi,

      I could not figure out why cstdlib instead of stdlib.h is used in your C application.

      Debao

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xtingray
        wrote on last edited by
        #3

        Interesting... I was looking for:

        % egrep -r cstdlib *

        and for:

        % egrep -r strtold *

        within the source code sub-directory and I couldn't find anything. So, just guessing, this message seems to be related to some conflict between the cygwin installation and QtCreator. I'll take a look deeper.


        Qt Developer

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xtingray
          wrote on last edited by
          #4

          This is the compilation output related to the error:
          http://www.maefloresta.com/portal/files/gcc-error.txt

          After running some tests, I found out something very weird: the error is triggered as soon as the compiler finds an include reference of any Qt object. I was changing the order of the headers to verify the issue and it always happens with the first include line.
          I'm starting to think that the problem is related to my Qt installation and not to my code.

          Any hints?


          Qt Developer

          1 Reply Last reply
          0
          • X Offline
            X Offline
            xtingray
            wrote on last edited by
            #5

            Ok, finally I discovered what was wrong with my project settings:

            • I installed Cygwin to use it as alternative toolchain and to use the zlib headers required by my project
            • I included the PATH of the cygwin headers into my .pro file
            • In some way, the cygwin headers are incompatible with the Qt headers, generating the compilation error.

            To solve it:

            • I just copied the zlib.h/zconf.h files in a new directory, and then I set this new PATH into my .pro file. Now the compilation is clean!

            Qt Developer

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved