VisualGDB doesnt allow to specify lib order

Sysprogs forums Forums VisualGDB VisualGDB doesnt allow to specify lib order

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8683
    b.timofte
    Participant

    Dear all i have this error

    /mingw/comp_4.9.2_testversion/bin/g++.exe -o Debug/17_01_Dev.exe -Wl,-Map,MAP.map -Wl,–allow-multiple-definition   -LSRC_Code  @Debug/17_01_Dev.exe.in -lwinmm -lws2_32  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib -static-libstdc++ -static-libgcc
    1>  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib(clocklFile.o):clocklFile.cpp: error VGDB1002: undefined reference to `_imp__timeSetEvent@20′
    1>  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib(clocklFile.o):clocklFile.cpp: error VGDB1002: undefined reference to `_imp__timeKillEvent@4′
    1>  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib(clocklFile.o):clocklFile.cpp: error VGDB1002: undefined reference to `_imp__timeBeginPeriod@4′
    1>  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib(clocklFile.o):clocklFile.cpp: error VGDB1002: undefined reference to `_imp__timeSetEvent@20′
    1>  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib(clocklFile.o):clocklFile.cpp: error VGDB1002: undefined reference to `_imp__timeKillEvent@4′
    1>  C:\VisualGdb\17_01_Dev\17_01_Dev\SRC_Code\MYLIB.lib(clocklFile.o):clocklFile.cpp: error VGDB1002: undefined reference to `_imp__timeSetEvent@20′
    1>collect2.exe : error : ld returned 1 exit status

     

    I think the issue is that i need to put my .lib file before library names winmm ws2_32

    VisualGDB doesnt allow this

    If i put my lib at library  names it uses -l flag and ofcourse it doesnt find it

    If i put it in additional linker inputs i get these errors

     

    Is VisualGDB not flexible enough? I cannot imagine no one use in a .lib files from mingw distribution

     

    • This topic was modified 8 years, 4 months ago by b.timofte.
    #8685
    support
    Keymaster

    Hi,

    Normally VisualGDB uses the –begin-group/–end-group options exactly to avoid the need to specify the library order manually.

    If you want to specify it manually and not use –begin-group/–end-group, you can do that by removing “winmm” from the “Library Names” field and manually putting the mix of “-lwinmm” and your .lib file in the correct order in the “Additional linker inputs” field.

    #8687
    b.timofte
    Participant

    I dont know what are you talking about honestly

    #8688
    support
    Keymaster

    Hi,

    We are talking about this post. By deselecting the –begin-group and –end-group options you have made the linker sensitive to the order of the inputs. If you enable those options back, it should solve the problem.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.