I must be doing something wrong

74 views
Skip to first unread message

tntexplosivesltd

unread,
Sep 19, 2011, 9:46:05 AM9/19/11
to gwen-discuss
Hey there. I want to include gwen into my project. The problem I have
at the moment is getting cmake to find the three .a files needed for
SFML projects. I just can't seem to make it find them. Any help would
be much appreciated.

Garry Newman

unread,
Sep 19, 2011, 1:53:41 PM9/19/11
to gwen-d...@googlegroups.com
Hey - what version of GWEN are you using? The downloaded zip or the SVN?

garry

tntexplosivesltd

unread,
Sep 19, 2011, 10:22:50 PM9/19/11
to gwen-discuss
I am using the latest SVN snapshot. I copied all the headers to my
project, and copied libgwen_static.a, libunittest.a and libGWEN-
Renderer-SFML.a into my project directory. At the moment I am only
trying to link against libGWEN-Renderer-SFML.a, but I am not too sure
on how to do this.

Isaac Wagner

unread,
Sep 19, 2011, 10:49:29 PM9/19/11
to gwen-d...@googlegroups.com
Do you just not know how to link to libraries? Are you using GCC? Are you building by hand, or are you using a build tool like Scons? Are you on Windows? Here's how you would do it on Windows with MinGW:

With the *.a files in the project directory (the same directory you do your building from), you would just pass the *.a files along with everything else when you link.

e.g.:
gcc main.cpp libGWEN-Renderer-SFML.a libgwen_static.a

Isaac Wagner

unread,
Sep 19, 2011, 10:51:48 PM9/19/11
to gwen-d...@googlegroups.com
Ah, sorry. I didn't see that you had said CMAKE. CMAKE is a huge pain in the ass, especially when working on Windows. You should take a look at Scons, which will allow you much more flexibility in linking to things in peculiar ways.

Erwin Coumans

unread,
Sep 20, 2011, 12:30:15 AM9/20/11
to gwen-d...@googlegroups.com
what's wrong with premake?

It seems superior to both cmake and scons, and gwen already uses premake as build system.

Isaac Wagner

unread,
Sep 20, 2011, 12:51:37 AM9/20/11
to gwen-d...@googlegroups.com
The main difference between premake and scons is that premake generates build scripts, whereas scons is the build script. Premake seems more like an alternative to CMake than Scons. I have never used premake, so I can't say how it compares, but at first glance it appears a good deal more sane than CMake.

Thomas Phillips

unread,
Sep 20, 2011, 1:01:20 AM9/20/11
to gwen-d...@googlegroups.com
No, I am using linux. I do not want to use premake at all, I don't want to use lua for compiling. I might just switch back to a bash script that runs gcc.
--
TNT

Erwin Coumans

unread,
Sep 20, 2011, 1:26:55 AM9/20/11
to gwen-d...@googlegroups.com

premake can autogenerate sane Makefiles, so you can just run make to compile. Those Makefiles are quite clean actually.

scons can be a build script, but it can also generate Visual Studio project files, like cmake and premake.
The main drawback of scons (in my opinion) is that it requires Python to be installed. For middleware, fewer dependencies are better, and premake has none (just a single 200kb executable).

I wrote my thought up in this blog posting: http://altdevblogaday.com/2011/03/13/meta-build-systems/,
probably a better location to discuss build systems than the gwen mailing list :)

Garry Newman

unread,
Sep 20, 2011, 2:27:09 AM9/20/11
to gwen-d...@googlegroups.com
Does the SFML sample compile properly?

garry

Thomas Phillips

unread,
Sep 20, 2011, 4:12:49 AM9/20/11
to gwen-d...@googlegroups.com
Yeah, it works fine, looks good. I'll try it with GCC later and see if that works.
--
TNT
Reply all
Reply to author
Forward
0 new messages