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 Link Errors #4

Closed
ravishchawla opened this issue Oct 5, 2015 · 13 comments
Closed

Unresolved Link Errors #4

ravishchawla opened this issue Oct 5, 2015 · 13 comments

Comments

@ravishchawla
Copy link

I set up the project by using PCL 1.7.2 and its depended libraries, but I get the following errors

Severity Code Description Project File Line
Error LNK2019 unresolved external symbol _PXCSession_Create@0 referenced in function "public: static class PXCSession * __cdecl PXCSession::CreateInstance(void)" (?CreateInstance@PXCSession@@SAPAV1@XZ) real_sense_viewer C:--\Visual Studio 2015\Projects\rs\build\real_sense.lib(real_sense_device_manager.obj) 1
Error LNK1120 1 unresolved externals real_sense_viewer C:--\Visual Studio 2015\Projects\rs\build\Debug\real_sense_viewer.exe 1

I built the VS solution in cmake (the only warnings I got were for OpenNI, which I don't have installed, but no errors or conflicts). I built it for an x86 build on a 64-bit.

@taketwo
Copy link
Owner

taketwo commented Oct 5, 2015

In the CMake output, do you see a line starting with Found RSSDK: ...? Can you paste it here?

@ravishchawla
Copy link
Author

that line isn't there. It finds the RSSDK and shows the location it found. Here is the output from that point

-- RSSDK: C:/Program Files (x86)/Intel/RSSDK
-- Configuring done
-- Generating done
-- Build files have been written to: C:/--/Documents/Visual Studio 2015

@taketwo
Copy link
Owner

taketwo commented Oct 5, 2015

Strange... maybe it's because we use different CMake versions (mine is 3.0.1).
Okay, what is the value of RSSDK_LIBRARIES variable?

@ravishchawla
Copy link
Author

I am using 3.30. These are the RSSDK variables that cmake has

RSSDK_DIR : C:/Program Files (x86)/Intel/RSSDK
RSSDK_LIBRARY : C:/Program Files (x86)/Intel/RSSDK/lib/x64/libpxc.lib
RSSDK_LIBRARY_DEBUG : C:/Program Files (x86)/Intel/RSSDK/lib/x64/libpxc_d.lib

@taketwo
Copy link
Owner

taketwo commented Oct 5, 2015

This looks good. Though you should have RSSDK_LIBRARIES variable set as well. If it does not show up in the cmake-gui, let's try to output it from the script. Paste in the end of CMakeLists.txt:

message(WARNING "RSSDK_LIBRARIES: ${RSSDK_LIBRARIES}")
message(WARNING "RSSDK_VERSION: ${RSSDK_VERSION}")

What does it give when configuring?

@ravishchawla
Copy link
Author

Here is the output.

CMake Warning at CMakeLists.txt:44 (message):
RSSDK_LIBRARIES: optimized;C:/Program Files
(x86)/Intel/RSSDK/lib/x64/libpxc.lib;debug;C:/Program Files
(x86)/Intel/RSSDK/lib/x64/libpxc_d.lib

CMake Warning at CMakeLists.txt:45 (message):
RSSDK_VERSION: 6.0.21.6598

@sebandraos
Copy link
Contributor

I hate to butt in but Ravish, you said you were building x86 (32-bit) and it looks like you're linking the x64 RSSDK libraries. Worth correcting that to make sure it isn't the issue or maybe it is.

RSSDK_LIBRARIES: optimized;C:/Program Files
(x86)/Intel/RSSDK/lib/x64/libpxc.lib;debug;C:/Program Files
(x86)/Intel/RSSDK/lib/x64/libpxc_d.lib

should be

RSSDK_LIBRARIES: optimized;C:/Program Files
(x86)/Intel/RSSDK/lib/Win32/libpxc.lib;debug;C:/Program Files
(x86)/Intel/RSSDK/lib/Win32/libpxc_d.lib

@ravishchawla
Copy link
Author

ah you were right. that fixed it. building properly now.

@sebandraos
Copy link
Contributor

Excellent, glad to hear it

@taketwo
Copy link
Owner

taketwo commented Oct 5, 2015

@sebandraos thanks for helping out! I'm an alien on Windows platform and don't feel comfortable myself when seeing such errors :)

@taketwo taketwo closed this as completed Oct 5, 2015
@sebandraos
Copy link
Contributor

No worries Sergey, it's one of those errors that's so easy to miss as it's just a couple of letters in a path but puts a real spanner in the works.

@friend047
Copy link

Sorry guys, I got the same problem in this
RSSDK_LIBRARIES: optimized;C:/Program Files
(x86)/Intel/RSSDK/lib/x64/libpxc.lib;debug;C:/Program Files
(x86)/Intel/RSSDK/lib/x64/libpxc_d.lib

but I don't know how to change the path to
RSSDK_LIBRARIES: optimized;C:/Program Files
(x86)/Intel/RSSDK/lib/Win32/libpxc.lib;debug;C:/Program Files
(x86)/Intel/RSSDK/lib/Win32/libpxc_d.lib

Someone could help me :( ?

@sebandraos
Copy link
Contributor

I assume that text is copied from CMake in which case the easiest thing to do is load the make via the GUI and then you can simply click on the text to change it.

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

4 participants