Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to cross compile for Windows with Linux/Mingw (part 2 of 3, bugfixes) #1149

Merged
merged 8 commits into from
May 19, 2017

Conversation

blackwarthog
Copy link
Collaborator

see PR #1092

Fix bugs which MinGW sensitive to.

@shun-iwasawa
Copy link
Member

jenkins

return TFxTimeRegion(tr1) += tr2;
}

inline DVAPI TFxTimeRegion operator+(const TFxTimeRegion &tr1, double shift) {
inline TFxTimeRegion operator+(const TFxTimeRegion &tr1, double shift) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are removing DVAPI from many parts. It seems that DVAPI is actually defined as __declspec(dllexport) in tcommon.h as follows:

145 #ifdef _WIN32
146 #define DV_EXPORT_API __declspec(dllexport)
147 #define DV_IMPORT_API __declspec(dllimport)
148 #define DV_EXPORT_VAR __declspec(dllexport)
149 #define DV_IMPORT_VAR __declspec(dllimport)
150 #else
151 #define DV_EXPORT_API
152 #define DV_IMPORT_API
153 #define DV_EXPORT_VAR
154 #define DV_IMPORT_VAR
155 #endif

Since __declspec is used only in MSVC, how about just replacing the line 145 above by #ifdef _MSC_VER instead of removing DVAPIs ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed DVAPI for inline function only. There is no reason to use dllexport/dllimport for inline functions. Because they are inline.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I got it!

@shun-iwasawa
Copy link
Member

LGTM

@shun-iwasawa shun-iwasawa merged commit 2fc36cb into opentoonz:master May 19, 2017
@blackwarthog blackwarthog deleted the mingw_2_of_3_bugs branch May 22, 2017 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants