(resolved) adding versions of the libraries (was: Creator: size_t/ssize_t not recognized)
-
You're welcome. :) Whether you remove and reinstall or not is completely up to you -- Qt doesn't care. I would do it, because (1) I like a tidy and consistent computing environment, and (2) Qt Creator displays the name of your installation root in your "Qt Versions" list
Actually, point (2) made me realize something: It probably looks nicer to install into C:\Qt\4.8.3\mingw\ and C:\Qt\4.8.3\msvc2010\ instead of C:\Qt\4.8.3_mingw\ and C:\Qt\4.8.3_msvc\ ... because Qt Creator will then say
"Qt 4.8.3 (mingw)" and "Qt 4.8.3 (msvc2010)"
instead of
"Qt 4.8.3 (4.8.3_mingw)" and "Qt 4.8.3 (4.8.3_msvc)" -
This is very useful; I think I'm almost there. Should I create a manual entry for the MSVC tool chain like I did for MinGW?
Edit:
I'm also getting some linker errors, stemming from my attempt to use sockets. According to the Microsoft online documentation, I should be including this library (which I am):
@_WIN32:libs += "C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86/ws2_32.lib"@
Any idea what might be going on here?
-
Pretty much.
I've always found manual setup easier than auto-detection, since I don't need to worry about the order of installation (the latter requires a library-and-then-Creator order). Also, I can remove/upgrade my manual installation at any time -- Creator will complain if an auto-detected library is removed, and won't auto-detect a version upgrade.
-
OK, I think I'm really close to wrapping this up. Here's the final (for now!) loose end:
MinGW and MSVC use different libraries for socket functions. MSVC uses ws2_32.lib, which I believe is the "standard" library for this purpose. MinGW, on the other hand, uses libws2_32.a.
So...how do I create entries in my .pro file that will work for both tool chains? (I assume that I want to use the different libraries for the respective tool chains.)
Thanks.
-
Hmm... I'm not sure. Does the `-lws2_32' flag not work for both versions of the library?
It might be worth starting a new thread, to get a new set of eyes.
-
@
LIBS += -lws2_32
@(although, I just realized it might be a GCC flag)
-
No problem :) Glad to hear that your setup has finally succeeded