Results 1 to 9 of 9

Thread: Problem deploying a two library + executable application to windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem deploying a two library + executable application to windows

    Here you have the step that gets the error while compiling and some of the errors (almost 300 of the same error appear).

    Qt Code:
    1. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o ..\bin\Contabilidad.exe object_script.Contabilidad.Release -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmain -L../bin -L../sqldrivers -lstdc++ -lQtSql4 -lpronetModel -lcont -lQtSql4 -lQtGui4 -lQtCore4
    2.  
    3. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x132): undefined reference to `fechaedit::RW()'
    4.  
    5. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x140): undefined reference to `fechaedit::RW()'
    6.  
    7. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x14e): undefined reference to `fechaedit::RW()'
    8.  
    9. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x7e1): undefined reference to `fechaedit::fecha()'
    10.  
    11. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x81f): undefined reference to `fechaedit::fecha()'
    12.  
    13. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x85d): undefined reference to `fechaedit::fecha()'
    14.  
    15. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x89e): undefined reference to `fechaedit::fecha()'
    16.  
    17. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x9e9): undefined reference to `fechaedit::RO()'
    18.  
    19. ./..\obj\unidadesservicio.o:unidadesservicio.cpp:(.text+0x9f7): undefined reference to `fechaedit::RO()'
    20.  
    21. ................................................................................
    22.  
    23. goes on and on until almos 300 errors like this ones.
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problem deploying a two library + executable application to windows

    I don't see lib1 or lib2 being linked in - perhaps the linker has problem locating them?

    It may be helpful to compare the output from the linker between linux and windows.

  3. #3
    Join Date
    Nov 2010
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem deploying a two library + executable application to windows

    The linux output works correctly, without prompting errors, I just don't get why it says all those undefined error, because the compiler does recognize the libraries (if i remove the -lpronetModel and -lcont from the .pro file, it prompts an error telling me that the compiler hasn't found the required libs).

    By the way, the real name of lib1 and lib2 are cont and pronetModel (libXXX.so in linux and XXX.dll in windows), so the linker does uses them :

    Qt Code:
    1. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o ..\bin\Contabilidad.exe object_script.Contabilidad.Release -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmain -L../bin -L../sqldrivers -lstdc++ -lQtSql4 -lpronetModel -lcont -lQtSql4 -lQtGui4 -lQtCore4
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problem deploying a two library + executable application to windows

    so which library contains fechaedit?

    when you moved the project over to windows, did you do a proper clean project? Remove all make files, <project>.pro.user, object_script*.* files?

    Is there a way to build a small app just using one of the libs?

Similar Threads

  1. Font problem when deploying a Qt-based application to Ubuntu 10.10
    By dictoon in forum Installation and Deployment
    Replies: 8
    Last Post: 13th March 2011, 20:26
  2. Replies: 3
    Last Post: 21st February 2011, 00:20
  3. Deploying an application on windows
    By dmcr in forum Installation and Deployment
    Replies: 1
    Last Post: 23rd September 2009, 09:23
  4. problem with deploying static application in windows
    By remy06 in forum Installation and Deployment
    Replies: 3
    Last Post: 2nd June 2009, 06:46
  5. Replies: 7
    Last Post: 11th March 2006, 15:51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.