Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Library file redefinition error

Library file redefinition error

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 4 Posters 0 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.
  • P Offline
    P Offline
    palanirajan
    wrote on last edited by
    #1

    hi iam using two different third party library in my application, that two library using one structure with same name("_Bolb"). if i try to include two library header files in my application iam getting struct redefinition error, but i have to use this two library in my application, i tried this by keep one lib headerfile under my own namespace and another headerfile in with out namespace, eg., namespace myspace{first.h}, myspace::Cfirst obj; if i try to access the library iam getting linker error unresolve external symbol myspace::Cfirst @$%^&$ " like this, how can i go around this problem, can any help me thanks and regards

    F J 2 Replies Last reply
    0
    • P palanirajan

      hi iam using two different third party library in my application, that two library using one structure with same name("_Bolb"). if i try to include two library header files in my application iam getting struct redefinition error, but i have to use this two library in my application, i tried this by keep one lib headerfile under my own namespace and another headerfile in with out namespace, eg., namespace myspace{first.h}, myspace::Cfirst obj; if i try to access the library iam getting linker error unresolve external symbol myspace::Cfirst @$%^&$ " like this, how can i go around this problem, can any help me thanks and regards

      F Offline
      F Offline
      fefe wyx
      wrote on last edited by
      #2

      Well, in that case you may have to recompile the libraries. You may either change the structure names, or put the libraries in different namespaces.

      P 1 Reply Last reply
      0
      • F fefe wyx

        Well, in that case you may have to recompile the libraries. You may either change the structure names, or put the libraries in different namespaces.

        P Offline
        P Offline
        palanirajan
        wrote on last edited by
        #3

        i dont have control on library files then how can i compile or change the struct name the library, i should have to do some thing in my application, like wraper class,or proxy but iam not sure, can any one help in this case

        1 Reply Last reply
        0
        • P palanirajan

          hi iam using two different third party library in my application, that two library using one structure with same name("_Bolb"). if i try to include two library header files in my application iam getting struct redefinition error, but i have to use this two library in my application, i tried this by keep one lib headerfile under my own namespace and another headerfile in with out namespace, eg., namespace myspace{first.h}, myspace::Cfirst obj; if i try to access the library iam getting linker error unresolve external symbol myspace::Cfirst @$%^&$ " like this, how can i go around this problem, can any help me thanks and regards

          J Offline
          J Offline
          john5632
          wrote on last edited by
          #4

          try Project settings->linker->command line: /FORCE:MULTIPLE

          J 1 Reply Last reply
          0
          • J john5632

            try Project settings->linker->command line: /FORCE:MULTIPLE

            J Offline
            J Offline
            jhwurmbach
            wrote on last edited by
            #5

            That is just shutting up the linker, who is rightly reporting a problem.


            Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
            George Orwell, "Keep the Aspidistra Flying", Opening words

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups