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

Got some trouble when building the examples #187

Open
EmptyZJH opened this issue Jun 19, 2018 · 14 comments
Open

Got some trouble when building the examples #187

EmptyZJH opened this issue Jun 19, 2018 · 14 comments

Comments

@EmptyZJH
Copy link

Hi!
When I build the examples, I got this error:
LINK : fatal error LNK1104: cannot open file“..\lib\Debug\gmock_main.lib”
Can anyone tell me how to fix this? Thanks!

@wonjin
Copy link
Contributor

wonjin commented Jun 19, 2018

please let me know your enviroment and error logs.
I had a same issue few weeks ago on visual studio 2017.
For me, the issue was about warning level so what I did is to ignore all the warning.
Change the /W3 option with /w in the CMAKE_CXX_FLAGS.

@EmptyZJH
Copy link
Author

//when I use cmake, here is a warning below. Then I'm using VS2015
CMake Warning (dev) at C:/OIL/output/OpenIGTLinkConfig.cmake:67 (include):
Policy CMP0024 is not set: Disallow include export result. Run "cmake
--help-policy CMP0024" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

The file

C:/OpenIGTLink/OpenIGTLink_Build/OpenIGTLinkTargets.cmake

was generated by the export() command. It should not be used as the
argument to the include() command. Use ALIAS targets instead to refer to
targets by alternative names.

Call Stack (most recent call first):
Testing/CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

@EmptyZJH
Copy link
Author

After changing W3 into w, the problem got fixed. That is such a clever one, thank you! And I have a worse problem. I don't find the "igtlSocketTest.exe". Should I include the websocket in Cmake?

image

@wonjin
Copy link
Contributor

wonjin commented Jun 19, 2018

If you don't use CMake for your project, I recommend to use the shared library.
Check the BUILD_SHARED_LIBS option

@EmptyZJH
Copy link
Author

Yeah, I clicked the BUILD_SHARED_LIBS and did it again. There still doesn't have the "igtlSocketTest.exe

@wonjin
Copy link
Contributor

wonjin commented Jun 19, 2018

Did you build igtlSocketTest project?
Please show me the build log.

@EmptyZJH
Copy link
Author

image
I can't. How to build the WebSocket?

@EmptyZJH
Copy link
Author

Do I have to build it in the "test" folder? Or it is automatically built? Why can't I find it?

@wonjin
Copy link
Contributor

wonjin commented Jun 19, 2018

Do you need to build the websoscket? if not, don't build it.
And try to build igtlsockettest project.

@EmptyZJH
Copy link
Author

WhenI build the igtlsockettest project, it turns out to be an error saying it cannot find the "webSocket.cmake",so if i don't build the webSocket, how can I get this?

@leochan2009
Copy link
Contributor

Hi,

There is no need to activate the WebSocket option in cmake.
As gmock is not build successfully for all compiler, IgtlSocketTest, igtlClientSocketTest and igtlServerSocketTest are all deactivated in the cmake file. you could activate them by uncomment these lines:
https://github.com/openigtlink/OpenIGTLink/blob/master/Testing/CMakeLists.txt#L59
https://github.com/openigtlink/OpenIGTLink/blob/master/Testing/CMakeLists.txt#L138

@EmptyZJH
Copy link
Author

@leochan2009 Thank you brother Quan. I'm in Beijing and just stepped into this field. I got confused with OpenIGTLink and have some problems. May I have your WeChat or email so I can ask some specific questions?

@leochan2009
Copy link
Contributor

@EmptyZJH ,
Hi,
my email address is [email protected]
BTW, i am no longer working at BWH, so i could only spend limited time on this library.

Best,
Longquan

@EL-SHREIF
Copy link

Can I know how you build example ?

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