Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Linker problem with Qt 5.0.2 when compiling with VS 2010 64bit

Linker problem with Qt 5.0.2 when compiling with VS 2010 64bit

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 1.4k 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.
  • E Offline
    E Offline
    ebenavides
    wrote on last edited by
    #1

    Hi,
    I'm new to Qt 5.0.2 and I don't know if this question is simple, but I don't know how to solve it.

    I downloaded the source code to compile it using Visual Studio 2010 in 64bit. After compiling it successfully, I decided to make a test in QtCreator.

    I made a simple console app, and since I have both libraries (32bit AND 64bit) in separate directories, I made this example using a QtCreator's kit that points to a 32bit environment, and no problems running and compiling it. But when I change it to the Kit with 64bit toolchain, I got the following linker error:

    :-1: warning: LNK4044: unrecognized option '/Qt/Qt5.0.2/5.0.2/msvc2010_x64/lib\Qt5Cored.lib'; ignored

    Then I take a look into the file Makefile.debug and found this line:

    LIBS = /LIBPATH:/Qt/Qt5.0.2/5.0.2/msvc2010_x64/lib /Qt/Qt5.0.2/5.0.2/msvc2010_x64/lib\Qt5Cored.lib

    It's using the slash to separate directories as is used in Unix-like systems, but in Windows it should use the backslash () to do the same.

    Manually editting the file and changing that line to:

    LIBS = /LIBPATH:\Qt\Qt5.0.2\5.0.2\msvc2010_x64\lib \Qt\Qt5.0.2\5.0.2\msvc2010_x64\lib\Qt5Cored.lib

    Makes the program builds and runs correctly. So, my question is: how can I indicate QtCreator that it must use the backslash () instead the slash (/) for the directories in the Library paths?

    Thanks in advance,

    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