ralphc

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Recursive linking #3041
    ralphc
    Participant

    Hi bazis,

    Have you or any of your colleagues had time to look at my previous post?

    Ralph

    in reply to: Recursive linking #3043
    ralphc
    Participant

    Hi,

    Sorry for the late response. Work has been really busy!

    I’ve put together a test application showing the issue. I’ve got an application called LibraryLinkApp. This application is dependent on a static library called StaticA. The static library is then dependent on an so called DynamicB. All three projects are stored within a single solution. I’ve set LibraryLinkApp’s dependencies so that it is dependent on the two libraries. I’ve set StaticA’s project settings so that it’s dependent on DynamicB. When I build the application I get undefined references to methods in the DynamicB library. The output from make is:

    
    g++ -o Debug/LibraryLinkingTest -Wl,-gc-sections    -Wl,--start-group Debug/LibraryLinkingTest.o  ../DynamicB/Debug/DynamicB.so ../StaticA/Debug/StaticA.a -Wl,--rpath='$ORIGIN' -Wl,--rpath='$ORIGIN/../../DynamicB/Debug/' -Wl,--rpath='$ORIGIN/../../StaticA/Debug/'  -Wl,--end-group
    ../StaticA/Debug/StaticA.a(A.o): In function `A::GetDependentClassName()':
    /opt/library_link_test/StaticA/A.cpp:15: undefined reference to `B::GetClassName()'
    ../StaticA/Debug/StaticA.a(A.o): In function `A::GetDependentLibraryName()':
    /opt/library_link_test/StaticA/A.cpp:20: undefined reference to `B::GetLibraryName()'
    collect2: ld returned 1 exit status
    make: *** [Debug/LibraryLinkingTest] Error 1
    

    However, if I move DynamicB.so to outside the –start/–end-group sections it compiles correctly. I hope this helps. If you need any further information let me know.

    Ralph

    in reply to: Multiple project configuration #2892
    ralphc
    Participant

    Hi,

    I’d like to be able to create the vcxproj, Makefile, vgdbsettings, debug/release.mak files all from a CMake file. This means that I can just store the CMake files in version control and not the VisualGDB project files. I think this would require a change to CMake with the addition of a new generator for use with VisualGDB. I suppose this isn’t really Sysprogs responsibility but the CMake community’s?

    in reply to: Multiple project configuration #2888
    ralphc
    Participant

    Hi Ket,

    I managed to get it working today. I originally tried sharing the root directory but for some reason when I was building the projects within root it was searching for a Makefile in the root directory and not the project directory. Starting with a new solution and new project files sorted things out.

    Thanks for the help. Great product. Any chance of CMake support? Would make VisualGDB even better.

    Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)