3

Please forgive me if i'm asking in the wrong SA.

Note: This is NOT about compiling wine itself!

I am trying to figure out how to compile windows application with wine's windows.h. I have installed wine-dev package and i can see that windows.h was placed in /usr/include/wine/windows/windows.h, but when i try to compile it cannot find it. I have attempted to run

pkg-config --libs wine

But that returns the error:

Package wine was not found in the pkg-config search path.
Perhaps you should add the directory containing `wine.pc'
to the PKG_CONFIG_PATH environment variable
No package 'wine' found

Replacing wine with wine1.6, wine-dev, or wine1.6-dev does not resolve the issue.

1 Answer 1

1

I have finally found the answer. But i am sure that there is a better solution out there.

Problem as it stands: Wine does not provide a .pc file, which means that pkg-config is unable to determine where to the headers are.

The solution is to use winecpp compiler, which is actually a wrapper around gcc, but automatically links all the header directories of wine. This compiler is designed to be as compatible as possible with MinGW, which means that it should be quite easy to setup the design team across Windows/POSIX boundary (but that is no excuse to leave out .pc file).

2
  • 2
    To find a header file (.h), the way to make it known is with the -I flag to gcc (used with a path: -I/usr/include/wine/windows). Of course that's the kind of thing that config files are for, so maybe the relevant setting goes in one of them.
    – alexis
    Dec 8, 2013 at 18:06
  • My guess is that it's exactly what winecpp and wineg++ do at their core. But thanks for this pointer, i'll keep that in mind for the future.
    – v010dya
    Dec 9, 2013 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .