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

VS2015 x64 MFC not work #28

Closed
itas109 opened this issue May 22, 2020 · 2 comments
Closed

VS2015 x64 MFC not work #28

itas109 opened this issue May 22, 2020 · 2 comments
Labels

Comments

@itas109
Copy link
Owner

itas109 commented May 22, 2020

Describe the bug
VS2015 x64 MFC not work

Desktop (please complete the following information):

  • OS: Win7 Ultimate 64bit
  • Compiler: VS2015 update 3 x64
  • Version: 4.0.3.20200429

error source code

signal0::connect
this->m_connected_slots.push_back(conn);
@itas109 itas109 added the bug label May 22, 2020
@itas109
Copy link
Owner Author

itas109 commented May 22, 2020

follow code may be useful.

sigslot.h define this:

#define SIGSLOT_DEFAULT_MT_POLICY single_threaded

@itas109
Copy link
Owner Author

itas109 commented Jan 3, 2021

In Visual Studio 2015 above x64, WIN32 not deined, _WIN32 defined.
so, change WIN32 to _WIN32. This problem solved.

Notice:
this problem only error when x64 mfc(win32 mfc is ok), examples/CommNoGui(not mfc) x64 is ok.

Testd (CSerialPort 2020-01-03 : sigslot.h WIN32 to _WIN32) :

  • vs 2013 win32/x64
  • vs 2019 win32/x64
  • mingw492_32

#if defined(SIGSLOT_PURE_ISO) || (!defined(WIN32) && !defined(__GNUG__) && !defined(SIGSLOT_USE_POSIX_THREADS))
#	define _SIGSLOT_SINGLE_THREADED
#elif defined(WIN32)
#	define _SIGSLOT_HAS_WIN32_THREADS
#	include <windows.h>
#elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS)
#	define _SIGSLOT_HAS_POSIX_THREADS
#	include <pthread.h>
#else
#	define _SIGSLOT_SINGLE_THREADED
#endif

chang to

#if defined(SIGSLOT_PURE_ISO) || (!defined(_WIN32) && !defined(__GNUG__) && !defined(SIGSLOT_USE_POSIX_THREADS))
#	define _SIGSLOT_SINGLE_THREADED
#elif defined(_WIN32)
#	define _SIGSLOT_HAS_WIN32_THREADS
#	include <windows.h>
#elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS)
#	define _SIGSLOT_HAS_POSIX_THREADS
#	include <pthread.h>
#else
#	define _SIGSLOT_SINGLE_THREADED
#endif

@itas109 itas109 closed this as completed in 483ccbc Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant