cmake errors

Release and discuss things you've made, including mods.
User avatar
killing time
Programmer
Posts: 92
Joined: Wed Jul 04, 2012 7:55 am UTC

cmake errors

Postby killing time » Sun Dec 16, 2012 9:11 am UTC

I'm trying to compile the source with mingw on Windows. My problem is that I cannot get cmake to find any libraries. I don't want to compile them now (I tried that for one and it did not work either). Instead want to use the files I already have. First of all I should make sure I understand what is meant by a library. It refers to the .dll files, right? Or is it something else that it is looking for? I tried pasting the DLLs all over the place but to no avail.

The error stems from the following line in cmakelist.txt:

Code: Select all

find_package( SDL REQUIRED )

with a message 'could NOT find SDL (missing: SDL_LIBRARY)'
The error also occurs for dozens of similar lines for finding GLEW, zlib, etc.
Where and for what does this command search?
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: cmake errors

Postby danmal » Mon Dec 17, 2012 4:43 am UTC

Have you considered using VS? It's much easier to setup and there's a free version available for download.

In general you'll want to link against .a or .lib files and not a .dll. I don't use MinGW but I'm sure someone who does can provide more info.
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: cmake errors

Postby Ishq » Mon Dec 17, 2012 10:12 am UTC

Using MingW32 is a bit more annoying because you have to configure all the paths yourself. Start up CMake GUI and for all the missing libraries, specify the paths. The libraries can either be found in your Mingw32 install or in the src/libs dir in the Unvanquished source tree. If you pick the libs from the Unvanquished source tree, make sure you pick the proper architecture.
User avatar
killing time
Programmer
Posts: 92
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: cmake errors

Postby killing time » Tue Dec 18, 2012 2:26 pm UTC

Took me hours to understand that the variables are actually requesting input, and are not supposed to be automatically generated. It's quite an intimidating list of values it wants the user to enter... I typed in some things but it definitely feels like I'm doing it wrong--this could take months. To my further dismay, I realized there is no verification as to whether you entered something correctly. It will say it "found" a library even if you didn't enter a valid path. I wonder how much more noobish flailing I will do before giving up, lol. Perhaps it is simply a wrongheaded idea to try this on a Windows machine.
epicdude
Dretch
Posts: 58
Joined: Thu Nov 01, 2012 3:07 am UTC
Location: Poland, European Union of Communism

Re: cmake errors

Postby epicdude » Wed Dec 19, 2012 12:47 am UTC

do it on a linux like a boss
-----------------------------------------------
Image
Image
Image Image
<N7Reaper> Put your whole fist in
<epicaldude> thats what urmooooom said
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: cmake errors

Postby Ishq » Wed Dec 19, 2012 1:57 am UTC

killing time wrote:Took me hours to understand that the variables are actually requesting input, and are not supposed to be automatically generated. It's quite an intimidating list of values it wants the user to enter... I typed in some things but it definitely feels like I'm doing it wrong--this could take months. To my further dismay, I realized there is no verification as to whether you entered something correctly. It will say it "found" a library even if you didn't enter a valid path. I wonder how much more noobish flailing I will do before giving up, lol. Perhaps it is simply a wrongheaded idea to try this on a Windows machine.


I suppose that's true. You could use a free version of VS and get the benefit of the batch script though.
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: cmake errors

Postby danmal » Thu Dec 20, 2012 3:02 am UTC

Cmake will try to find your libraries. If they're all in one place you can pass -DCMAKE_PREFIX_PATH="C:/path/to/folder" and CMake should be able to find them.
User avatar
killing time
Programmer
Posts: 92
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: cmake errors

Postby killing time » Thu Dec 20, 2012 6:18 am UTC

I tried compiling in VS and still experienced problems. I got something out of cmake this time, but then it was unable to compile the SDL library.
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: cmake errors

Postby danmal » Thu Dec 20, 2012 6:54 am UTC

Can you post output from VS as well as your CMakeCache.txt file?
User avatar
killing time
Programmer
Posts: 92
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: cmake errors

Postby killing time » Fri Dec 21, 2012 11:02 am UTC

OK, thank you for taking so much interest in this problem.

A couple of files had these includes which cause errors:

Code: Select all

#include <ddraw.h>
#include <dsound.h>
#include <dinput.h>

There weren't any files with these names anywhere in the source directory.

Compiler output for SDL project:

Code: Select all

------ Build started: Project: INTERNAL_SDL, Configuration: Debug Win32 ------
Compiling...
SDL_dx5audio.c
c:\unvsource\unvanquished-master\src\libs\libsdl\src\audio\windx5\directx.h(78) : fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory
SDL_dx5yuv.c
c:\unvsource\unvanquished-master\src\libs\libsdl\src\video\windx5\directx.h(78) : fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory
SDL_dx5video.c
c:\unvsource\unvanquished-master\src\libs\libsdl\src\video\windx5\directx.h(78) : fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory
SDL_dx5events.c
c:\unvsource\unvanquished-master\src\libs\libsdl\src\video\windx5\directx.h(78) : fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory
Generating Code...
Build log was saved at "file://c:\unvsource\Unvanquished-master\build-32\src\libs\libsdl\INTERNAL_SDL.dir\Debug\BuildLog.htm"
INTERNAL_SDL - 4 error(s), 0 warning(s)


I attached CMakeCache.txt. It is plain text, not zipped. I had to rename it because the forum refused to upload it when the extension was txt.
Attachments
CMakeCache.txt.zip
(30.93 KiB) Downloaded 212 times

Return to “Community Development”

Who is online

Users browsing this forum: No registered users and 1 guest