InterlockedCompareExchange64 could not be found in kernel32.dll

6,246 views
Skip to first unread message

Ron Sid

unread,
Jun 11, 2012, 10:31:17 PM6/11/12
to mongodb-dev
Hello,
I am new to mongodb. I am using:
Windows XP SP2
MS Visual Studio 2010 Express
Boost 1.47 from boostpro.com/download
MongoDB mongodb-linux-x86_64-v2.0-latest.tgz

I built the mongoDB using that source above using scons. I built
release mode, d mode, 32 bit release mode.

I am starting with just a simple test
DBClientConnection c;
c.connect("localhost"); //"192.168.58.1");
cout << "connected ok" << endl;
Following guides on this posting
https://groups.google.com/group/mongodb-user/browse_thread/thread/e0e7ef3e6b428d82/7bebd660ac165ae4?hide_quotes=no,
\
I managed to compile this with no error message. (I managed to compile
under release, debug, 32bit release mode)

But when I run the app, I always get the error message "The procedure
entry point InterlockedCompareExchange64 could not be located in the
dynamic link library KERNEL32.dll"...
At first look, seems like this is because I am running Windows XP, but
there has been several posts online that proofed that mongoDB can work
using Windows XP...

Any idea what to do here? I don't know where in the code that
InterlockCompareExchange64 is called... Maybe in Boost, maybe in
mongodb?


Thanks for your advice.

Andy Schwerin

unread,
Jun 12, 2012, 12:13:31 AM6/12/12
to mongo...@googlegroups.com
Hi,

If you're seeing that error message, you're attempting to run the latest development branch.  The latest development branch no longer supports Windows XP.  Windows Vista is the oldest Windows client supported, and Windows Server 2003 is the oldest Windows server supported.

The 2.0 stable branch continues to support Windows XP.  Version 2.0.6 and the most recent successful nightly build are your options.

-Andy


--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-dev?hl=en.


Ron Sid

unread,
Jun 12, 2012, 8:47:52 PM6/12/12
to mongo...@googlegroups.com
Thanks a lot Andy for your answer.
Honestly I don't remember which one I downloaded. I am going to try downloading 2.0.6 now and try it and let you know.

BTW, how does one know which version he have?
Is it by looking into the doxygen config? (Seems like I have 2.1.2-pre-)

Thanks.
-Andy

To unsubscribe from this group, send email to mongodb-dev+unsubscribe@googlegroups.com.

Andy Schwerin

unread,
Jun 13, 2012, 10:42:02 AM6/13/12
to mongo...@googlegroups.com
If you're downloading the source code, you can look in "version.cpp".  In the 2.0 branch, the file is in the "util" directory.  In the master (2.1) branch, it is in src/mongo/util.

If you've got binaries, you can pass the --version flag to "mongo" or "mongod", and it will print the version and exit.

-Andy

To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-dev/-/CH79ZpY1aN0J.

To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.

Ron Sid

unread,
Jun 13, 2012, 9:29:57 PM6/13/12
to mongo...@googlegroups.com
Thanks.

As an update to everyone, when I use 2.0.6, it works. 
So 2.1 doesn't support Windows XP... 
Does that mean that XP users are stuck and can't follow the updates?

Or is there a way to trick this InterlockCompareExchange64 call so that it can run in XP somehow? I read online seems like one can change targetver.h somehow, but I tried many times with no luck

#ifndef _WIN32_WINNT            // Allow use of features specific to Windows Vista or later.
#define _WIN32_WINNT 0x0600     // Change this to the appropriate value to target other versions of Windows.

Do you know?

Thanks.

Andy Schwerin

unread,
Jun 13, 2012, 10:11:09 PM6/13/12
to mongo...@googlegroups.com
It is possible to implement a replacement function for InterlockedCompareExchange64 in assembly on XP systems. However, in the future, I expect mongo to use other functionality that is not available in XP.  Eventually, XP users simply won't be able to run the server anymore.
-Andy

To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/mongodb-dev?hl=en.

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-dev/-/qh-uDXAoOjkJ.

To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages