Opened 8 years ago

Closed 8 years ago

#10761 closed Support Requests (invalid)

Multiple definition error during linking

Reported by: variganji.suresh@… 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)

os_file_functions.hpp (21.6 KB ) - added by variganji.suresh@… 8 years ago.
code changes with multiple definition error

Download all attachments as: .zip

Change History (3)

by variganji.suresh@…, 8 years ago

Attachment: os_file_functions.hpp added

code changes with multiple definition error

comment:1 by viboes, 8 years ago

Component: Noneinterprocess
Owner: set to Ion Gaztañaga

comment:2 by Ion Gaztañaga, 8 years ago

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.