Opened 8 years ago
Closed 8 years ago
#10761 closed Support Requests (invalid)
Multiple definition error during linking
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Multiple definition | Cc: |
Description
Hi Team, I am trying to create Mutex using boost::interprocess::named_recursive_mutex(..) but in iOS 8 it failed to create a mutex due to "Opeation Not Permitted" error. When i looked into boost internal code it is trying to create a folder at "\tmp\boost_interprocess" which is not accessible.So to fix this error, i set the path form the application to a global variable in "os_file_functions.hpp" to read path in "boost:interprocess:ipcdetail::get_temporary_path". But when i tried to include "os_file_functions.hpp" in my application at multiple files, it throwing error as "Multiple definition error" during linking. Can you please let me know how to fix it.
Thanks, Suresh
Attachments (1)
Change History (3)
by , 8 years ago
Attachment: | os_file_functions.hpp added |
---|
comment:1 by , 8 years ago
Component: | None → interprocess |
---|---|
Owner: | set to |
comment:2 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You are defining a global variable in a header file, that's always a multiple definition error if the file is included twice. You must declare it in a header but define it in a cpp files.
code changes with multiple definition error