mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] OpenCSG again


From: Brad Pitcher
Subject: Re: [Mingw-cross-env-list] OpenCSG again
Date: Mon, 19 Sep 2011 18:48:12 -0700

Sweet! It works great now. I just have a couple other questions for you guys related to this static/dynamic stuff.
I have a couple more packages I'm working on so I need to know how to do this same technique with them.
First, I have a cmake built library (libCGAL) that I want to make sure I'm building statically. If I just use the provided toolchain file:
cmake ... -DCMAKE_TOOLCHAIN_FILE=/where mingw-cross-env is installed/usr/i686-pc-mingw32/share/cmake/mingw-cross-env-conf.cmake

Is that enough to make a static build, or is there anything else that needs to be modified.
Also, are those *_STATIC definitions automatically available for use?
In other words, if I just statically build libCGAL and install the *.a files, can I then add a DEFINES += CGAL_STATIC in order
to use the library in another program? Or is there something else that needs to be done first?
Thanks again guys,
Brad

On Mon, Sep 19, 2011 at 6:39 AM, Tony Theodore <address@hidden> wrote:
On 19 September 2011 20:11, René Berber <address@hidden> wrote:
> On 18 Sep 2011 15:58:57, Brad Pitcher  wrote:
> [snip]
>> release/main.o:main.cpp:(.text+0x29f): undefined reference to
>> address@hidden'
> [snip]
>
> That means the linker is looking for dynamic libraries.
>
>> I hope this is a really obvious stupid mistake.
>
> No, the problem is that OpenCSG is not configured to build with static
> libraries.

It seems freeglut is the culprit here, it wasn't being built
statically in the first place. I've added a test program for both this
and glew:

http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/df85f59a791d
http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/cad00a9e1f6d

Fortunately, glew has a pkg-config entry, but something like this:

-lglut -lglu32 -lopengl32 -lwinmm -lgdi32 -mwindows -DFREEGLUT_STATIC

from the test program works for freeglut.

Cheers,

Tony



reply via email to

[Prev in Thread] Current Thread [Next in Thread]