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
Cross-compiling to Windows with MinGW #7
Comments
|
It seems I cannot attach a patch to an issue, so I paste the patch here and hope the formatting survives this: diff --git a/externals/UsePthreads.cmake b/externals/UsePthreads.cmake set_target_properties(pthread PROPERTIES COMPILE_DEFINITIONS PTW32_BUILD=1 FOLDER "Externals") install(TARGETS pthread #ifdef WIN32_API #ifdef EQ_USE_CUDA
+#define _WIN32_WINNT 0x500 // 2000, for WM_XBUTTONDOWN and others if(WIN32)
+#include // for malloc include <direct.h>define getcwd _getcwd+#else #ifndef MAXPATHLEN define NOMINMAXendifinclude <wtypes.h>-# include <WinCrypt.h> pragma comment(lib, "advapi32.lib")#endif diff --git a/libs/collage/base/uint128_t.cpp b/libs/collage/base/uint128_t.cpp +#include // for strtoull -void ConnectionDescription::setInterface( const std::string& interface )
void ConnectionDescription::setFilename( const std::string& filename ) |
|
To contribute code changes, please do the following: Fork the repository Then we'll see the pending commits on your side and can merge them easily. Optionally send a push request, if we don't pick it up automatically. |
|
Re your issue: can you compile with 'make VERBOSE=1' and add the full link command here? |
|
This is the full link command: Linking CXX shared library ../../bin/libEqualizerServer.dll |
|
The symbol should be in libEqualizer: eile% nm debug/libs/client/libEqualizer.dylib |c++filt|grep vtable|grep Object You closed the issue - is it solved? |
|
Sorry for closing this, it was by accident. You are right, the symbol indeed is in libEqualizer: The problem seems to be that the -Wl,--no-whole-archive option does not work correctly with my version of g++: it does not undo the effects of -Wl,--whole-archive. If I link without -Wl,--whole-archive, it works fine. So this is not a problem of Equalizer. I'll see if I find a workaround... |
I'm trying to cross-compile Equalizer for Windows on Ubuntu, using Mingw-cross-env.
There are a few minor problems regarding upper-/lowercase, missing includes, and one clash of a variable name with some header definition. I have a patch that fixes these; I'll try to attach it to this issue (not sure yet how this works on github).
But now I'm stuck with a problem when linking libEqualizerServer:
Linking CXX shared library ../../bin/libEqualizerServer.dll
Creating library file: libEqualizerServer.dll.a
CMakeFiles/lib_EqualizerServer_shared.dir/objects.a(channel.cpp.obj):channel.cpp:(.text$ZN2eq6fabric7ChannelINS_6server6WindowENS2_7ChannelEEC2ERKS5[eq::fabric::Channel<eq::server::Window, eq::server::Channel>::Channel(eq::fabric::Channel<eq::server::Window, eq::server::Channel> const&)]+0x61): undefined reference to
vtable for eq::fabric::Object' CMakeFiles/lib_EqualizerServer_shared.dir/objects.a(channel.cpp.obj):channel.cpp:(.text$_ZN2eq6fabric7ChannelINS_6server6WindowENS2_7ChannelEEC1ERKS5_[eq::fabric::Channel<eq::server::Window, eq::server::Channel>::Channel(eq::fabric::Channel<eq::server::Window, eq::server::Channel> const&)]+0x61): undefined reference tovtable for eq::fabric::Object'I tried to link with eq_fabric to solve this, but I don't know how this works with CMake, and somehow I think that this should not be done anyway.
Martin
The text was updated successfully, but these errors were encountered: