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

Build Error with Latest SVN Version (32-bit VS2010 Win 7 machine) #218

Closed
rcurtin opened this issue Dec 29, 2014 · 3 comments
Closed

Build Error with Latest SVN Version (32-bit VS2010 Win 7 machine) #218

rcurtin opened this issue Dec 29, 2014 · 3 comments
Assignees

Comments

@rcurtin
Copy link
Member

rcurtin commented Dec 29, 2014

Reported by Adam on 30 Aug 42288186 04:26 UTC
I get the following errors when I attempt to build a 32-bit release version via VS2010 off the latest svn version.

timers.cpp
F:\Data\sdks\mlpack\src\mlpack\core\util\timers.cpp(151): error : identifier "uint64_t" is undefined
uint64_t ptime = 0;
^

F:\Data\sdks\mlpack\src\mlpack\core\util\timers.cpp(151): error : expected a ";"
uint64_t ptime = 0;
^

F:\Data\sdks\mlpack\src\mlpack\core\util\timers.cpp(155): error : identifier "ptime" is undefined
ptime |= ftime.dwHighDateTime;

@rcurtin rcurtin self-assigned this Dec 29, 2014
@rcurtin rcurtin closed this as completed Dec 29, 2014
@rcurtin
Copy link
Member Author

rcurtin commented Dec 30, 2014

Commented by rcurtin on 22 Mar 42289543 18:37 UTC
I won't be able to look into this until Monday (~36 hours) because I don't have my Windows system handy, so it may be a bit before I have a fix. I think Visual Studio doesn't have a C99 conformant compiler (only C89) so uint64_t ends up not typedef'ed. My first guess at a fix would be to typedef uint64_t myself, maybe before including <mlpack/core.hpp> or in core.hpp (whatever is convenient).

typedef unsigned long long uint64_t;

I think the actual fix I commit will have to have some checks that sort of look like that and then define uint64_t if it isn't defined. I'd like to test if this works okay on a 64-bit box (I'm pretty sure it does? Not certain) too, but like I said it'll be a while until I can. Hopefully this fix can help you get by for now.

@rcurtin
Copy link
Member Author

rcurtin commented Dec 30, 2014

Commented by rcurtin on 21 Nov 42294793 22:48 UTC
Okay, I can't reproduce this. I have a 32-bit Windows 7 machine which I'm using to build MLPACK on; I'm using the Visual Studio 2010 compiler, with VS2010 Ultimate. Intellisense reports that uint64_t is defined in stdint.h, on line 60:

59 typedef _Longlong int64_t;
60 typedef _ULonglong uint64_t;
61
62 typedef _Longlong int_least64_t;
63 typedef _ULonglong uint_least64_t;
64
65 typedef _Longlong int_fast64_t;
66 typedef _ULonglong uint_fast64_t;

Theoretically you should see the same in the version of stdint.h you are using... if you don't, can you write what you do have? And more information about your system so I can try and reproduce this?

@rcurtin
Copy link
Member Author

rcurtin commented Dec 30, 2014

Commented by rcurtin on 27 Oct 42929139 21:08 UTC
Resolving due to inactivity. Feel free to reopen.

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

No branches or pull requests

1 participant