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. Problem with ImmSetConversionStatus
Forum Updated to NodeBB v4.3 + New Features

Problem with ImmSetConversionStatus

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 4.2k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    Baca48
    wrote on last edited by
    #1

    Hello

    I'm writing an app where I need support for japanese language and because of that I want to change keyboard layout from eng to jap automatically in order to type japanese characters so user won't have to do that himself.

    I've found WINAPI function 'ActivateKeyboardLayout'. Thanks to that I can change english layout to japanese IME but the problem is that it starts working in 'Direct mode' instead of 'Hiragana'. 'ImmSetConversionStatus' function is a solution for that but here I've found a problem:

    First function works fine with Qt4. However, the seconds one causes:

    @debug/widget.o:C:\Documents and Settings\Baca\Moje dokumenty\My Qt4 Projects\nihongo-build-desktop/../nihongo/widget.cpp:21: undefined reference to `ImmSetConversionStatus@12'

    collect2: ld returned 1 exit status@

    I've included <windows.h> and <imm.h> files. What am I doing wrong? These functions works fine in example project in VS2010.

    Thanks for help

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      This is a linker error message not a compiler message. This means you are missing a library reference. If you look at MSDN, this is:

      Coreimm.lib

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Baca48
        wrote on last edited by
        #3

        Thanks for the answer! Hovewer, I can't find anywhere this library. Adding:

        @LIBS += Coreimm.lib@

        to .pro file doesn't work either. What to do?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          Do you use the microsoft toolchain of mingw?
          for mingw, it would be

          @
          1
          LIBS += -lCoreimm.a
          @

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            you must search your computer where that file is and add the path to the .pro like this:

            @
            LIBS += -Lc:/path/to/the/dir -lCoreimm
            @

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #6

              ups, ok, for mingw without .a...
              But the windows libraries are already in the library search path for mingw I think.

              @
              win32 {
              LIBS += -ladvapi32 -luser32
              }
              @

              this normally works without adding the path

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Baca48
                wrote on last edited by
                #7

                Thanks for help! Your advice was very helpful. I've finally managed to compile my project. I added 'LIBS += -limm32' and now everything works nearly perfect.

                Everything works fine under Debug/Release mode in QtCreator. The problem occurs when I want to run compiled application. There are no errors but functions changing keyboard layout and IME are not working. What's wrong? I suppose it's because I use this library but I don't know how to run my app (without using QtCreator).

                I hope you'll be able to help me this time too :)

                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