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

Can't compile the .exe with visual studio 9.0 #71

Open
MariusLTU opened this issue Apr 5, 2018 · 9 comments
Open

Can't compile the .exe with visual studio 9.0 #71

MariusLTU opened this issue Apr 5, 2018 · 9 comments

Comments

@MariusLTU
Copy link

Hey,
I'm trying to generate bhtsne.exe by following your instructions, but I keep getting this message on the cmd:
sptree.cpp
sptree.cpp(111): error C3861: 'fmax': identifier not found
sptree.cpp(335): error C3861: 'fmax': identifier not found
NMAKE: fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"': return code '0x2'

Any idea how to fix it?

@ly63513
Copy link

ly63513 commented Apr 8, 2018

+1

@lvdmaaten
Copy link
Owner

I don't have Visual Studio (or a Windows machine), so I cannot reproduce the issue easily. Can you try and add the following line here and let me know if that resolves the issue?

#include <algorithm>

@MariusLTU
Copy link
Author

Thanks for your answer !
Unfortunately I did it and it still doesn't work.

@lvdmaaten
Copy link
Owner

Oh, sorry! In addition to the change you just made, can you do a global replace of fmax by std::max (there are two occurrences as far as I can tell)?

@MariusLTU
Copy link
Author

I got new errors for sptree.cpp(366):

error C2780: expects 3 arguments - 2 provided
see declaration of 'std::max'

error C2782: template parameter '_Ty' is ambiguous
see declaration of 'std::max'
could be 'unsigned int"
or 'int'

@lvdmaaten
Copy link
Owner

Ah! Can you also change the int here into unsigned int?

If that is insufficient, you could try explicitly templating the std::max call: depth = std::max<unsigned int>(depth, children[i]->getDepth());

@MariusLTU
Copy link
Author

Sorry for the late response !
the unsigned int looks like it solved the problem, the executable was created in the windows folder.
But when I open it, nothing happens...

@lvdmaaten
Copy link
Owner

Are you calling the executable through one of the (Matlab, Python, R) wrappers? These wrappers dump a little data file that the executable consumes. Without the data file, the executable will presumably terminate immediately.

@MariusLTU
Copy link
Author

I tried to run it with spyder but it could not compile it:

"TypeError: compile() expected string without null bytes"

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

3 participants