Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 14:25

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GCC symbol visibility
PostPosted: 21.02.2010, 22:34 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
This is a question for our Linux guys ;)

We use the following code to export solely the public API functions (the some ones as for Win32):
Code:
#if defined( __GNUC__ ) && __GNUC__ >= 4
#   define DLLEXP extern "C" __attribute__ ((visibility("default")))
#else

However, from what I can see, the visibility of all other symbols is not hidden. Should we add the following to the Horde3D and Horde3DUtils CMake files or do I miss something?
Code:
# Hide all symbols except the ones which are explicitly marked as visible
if(CMAKE_COMPILER_IS_GNUCXX)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif(CMAKE_COMPILER_IS_GNUCXX)

Note: the GCC version is not checked


Top
 Profile  
Reply with quote  
PostPosted: 21.02.2010, 22:49 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Ja, that looks about right - current versions of GCC default to all symbols visible for backwards compatibility reasons.

Might want to add a version check though, so that older versions of GCC won't complain.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group