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

dirent.h is missing when installed #4238

Closed
vigsterkr opened this issue Apr 10, 2018 · 12 comments
Closed

dirent.h is missing when installed #4238

vigsterkr opened this issue Apr 10, 2018 · 12 comments

Comments

@vigsterkr
Copy link
Member

it came out in #4231 that we are not shipping the dirent.h just have it when we compile... which makes compilation of dll and static lib successful but compiling against an installed libshogun will not be possible as we dont ship this dirent.h :(

@vigsterkr
Copy link
Member Author

@fyoda actually i've just checked, MSDirent is being installed to shogun/lib/external/MSDirent so there should be no problem with dirent.h.

@vigsterkr
Copy link
Member Author

can you actually paste me a compile command and the corresponding error when you observe problems with dirent.h?

@friente
Copy link

friente commented Apr 11, 2018

@vigsterkr

E:\Software\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Release
	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I. -I..\libs\shogun\include -IE:\Software\Qt\5.9.3\msvc2015_64\include -IE:\Software\Qt\5.9.3\msvc2015_64\include\QtGui -IE:\Software\Qt\5.9.3\msvc2015_64\include\QtANGLE -IE:\Software\Qt\5.9.3\msvc2015_64\include\QtCore -I..\build_release\_moc -IE:\Software\Qt\5.9.3\msvc2015_64\mkspecs\win32-msvc -Fo..\build_release\_obj\ @C:\Users\myUser\AppData\Local\Temp\main.obj.128308.0.jom
main.cpp
..\libs\shogun\include\shogun/lib/any.h(162): warning C4100: 'other': unreferenced formal parameter
..\libs\shogun\include\shogun/io/SGIO.h(16): fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
jom: C:\Users\myUser\Desktop\shoguntest\src\Makefile.Release [..\build_release\_obj\main.obj] Error 2
jom: C:\Users\myUser\Desktop\shoguntest\src\Makefile [release] Error 2

@vigsterkr
Copy link
Member Author

@fyoda ok so based on this i dont see any of the compiler flags that are being exported to ShogunTarget.cmake. how do you add shogun to your project?

@friente
Copy link

friente commented Apr 12, 2018

@vigsterkr I simply add the shogun's include path to my project, then link the .dll against the main.cpp.

@vigsterkr
Copy link
Member Author

@fyoda yeah unfortunately that's not enough :) you use qmake? in case of cmake i could tell you how to use shogun, but i'm not so sure yet how to that with Qt build framework

@friente
Copy link

friente commented Apr 12, 2018

I'm sorry @vigsterkr :), yes I use qmake. I'll send you more information when I go back to my PC.

@friente
Copy link

friente commented Apr 12, 2018

@vigsterkr I think that the problem is that there is no path specified when dirent.h is included.
Indeed if I add
#include <shogun/lib/external/MSDirent/dirent.h>

instead of
#include <dirent.h>

It works

@vigsterkr
Copy link
Member Author

@fyoda yes that's the problem,... but that's actually specified in the target cmake, i.e. ShogunTarget.cmake if you'd include shogun like that into your project.

@friente
Copy link

friente commented Apr 12, 2018

@vigsterkr I understand the point but I don't know how to include the generated ShogunTarget.cmake in my Qt project.
Maybe I can just add the following include paths:

set_target_properties(shogun::shogun-static PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/shogun;${_IMPORT_PREFIX}/include/shogun/lib/external/MSDirent;${_IMPORT_PREFIX}/include/shogun/lib/external/eigen;${_IMPORT_PREFIX}/include/shogun/lib/external/rxcpp;${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "winmm.lib"
  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "include/shogun/lib/external/eigen;include/shogun/lib/external/rxcpp"
)

specified in ShogunTarget.cmake

@friente
Copy link

friente commented Apr 12, 2018

@vigsterkr Adding those paths to my .pro file solve the issue.

@vigsterkr
Copy link
Member Author

vigsterkr commented Apr 13, 2018

@fyoda yes that was the idea..... thxn!

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

2 participants