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

unresolved external symbol in class? #20

Closed
trelau opened this issue May 22, 2017 · 7 comments
Closed

unresolved external symbol in class? #20

trelau opened this issue May 22, 2017 · 7 comments

Comments

@trelau
Copy link

trelau commented May 22, 2017

I get this error when I try and build LLVM/clang/binder:

image

I could never get the build.py script to work so I grabbed the latest LLVM/clang repo and manually put the binder folder in the file structure. I've applied the changes as described here.

I'm using Windows 10 64-bit Visual Studio 2015 Community Edition.

Update:
I get the same result for latest LLVM/Clang (version 5) and hard reset to 3.8.

@lyskov
Copy link
Member

lyskov commented May 22, 2017

I do not have Windows machine so i can not replicate this. But it looks like problems with linking, particularly that you might need to alter linking command line and instruct your compiler to link the right libstdc++ (i would guess then one that VC uses)...

@trelau
Copy link
Author

trelau commented May 23, 2017

hmmm...anything in that error look like a missing library? I can never decipher these things...

I used the /FORCE command to get an executable, and it was able to generate bindings for everything except classes since this error is in the class.obj file.

looping in @csarn since some success has been mentioned in the pull request.

@roccomoretti
Copy link
Member

Looks like it's having an issue finding the function std::pair< std::string, std::string > binder::function_arguments_for_lambda( clang::FunctionDecl const *, int) when attempting to link std::string binder::bind_constructor( clang::CXXConstructorDecl const *, std::pair< std::string, std::string > const &, unsigned int, bool, binder::Context &)

Which is odd, as that function should be present with binder/function.cpp ... unless there's an issue with the conversion of int to uint to Windows.

@lyskov I don't think uint is a standard C++ type. Where is the definition of this type supposed to be coming from? I couldn't find a typedef in binder proper, nor does it look like the LLVM headers use/define it. Windows having problems with the uint type might explain the issue.

@trelau
Copy link
Author

trelau commented May 23, 2017

@roccomoretti I converted all uint to unsigned int in my local repo. I'll admit I'm just blindly changing some source code to try and resolve it (I don't have a lot of experience in C++). Thanks for the input. I'll keep working on it.

@trelau
Copy link
Author

trelau commented May 23, 2017

jeez...when I replaced uint with unsigned int I had inconsistent types in the function_arguments_for_lambda method (one had int and the other had unsigned int)...typo..i'll close the issue

@trelau trelau closed this as completed May 23, 2017
@lyskov
Copy link
Member

lyskov commented May 23, 2017

Wow good find @roccomoretti i totally misread that error message!

@lyskov
Copy link
Member

lyskov commented May 23, 2017

@trelau re unit: the simplest solution to workaround it would probably be to add uint typedef in some of the Binder header and make it conditional for Windows platform with defines. Pull-request doing this will be welcome!

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