Welcome, Guest

Used openJaus (win32) as static lib
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Used openJaus (win32) as static lib
#246
Used openJaus (win32) as static lib 1 Year, 5 Months ago  
Hi,

I need to work with OJ libraries as static library (and not dll).

I've made 2 changes in the visual studio properties:
1. Configuration Type: Changed to Static Library from Dynamic Library.
2. Code Generation: Changed to Multi-threaded Debug from Multi-threaded Debug DLL.

As a result, I can run, but I get warnings in NM on classes that use the EXPORT define:
Code:

#ifdef WIN32

#define EXPORT __declspec(dllexport)

#else

#define EXPORT

#endif



This define exists in 2 files: NodeManagerEvent.h and FileLoader.h.

The warning:
Code:

openjaus\libopenjaus\include\nodemanager\events\debugevent.h(64) : warning C4251: 'DebugEvent::debugString' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'DebugEvent'

1>        with

1>        [

1>            _Elem=char,

1>            _Traits=std::char_traits<char>,

1>            _Ax=std::allocator<char>

1>        ]



When I remove the the define (#define EXPORT //__declspec(dllexport)) the warnings disappear.
1. How can I fix this problem? (I don't want to change OJ's defines)
2. In the next version, can you put each the definition only once?


Thanks,

Mayan.
Cohen
OpenJAUS Contributor
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#247
Re: Used openJaus (win32) as static lib 1 Year, 5 Months ago  
I think you have the correct solution for now. In the next version we'll have to have a separate define for static vs. dynamic lib.
tgalluzzo
Admin
Posts: 133
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Copyright © 2012 OpenJAUS. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.