Public Group

# MinGW and .libs

This topic is 1881 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am using the library awesomium to embed a browser as the ui for my game but they only release a .lib for visual studio and it doesnt have a .def with it. I have been reading about all sorts of different ways to generate a .a for mingw but havent been successful.

Can someone help point me to what I need to do to make a def or a file? Thanks

##### Share on other sites
• The link to awesomium would be nice
• In general the source code is very helpful
• You build your static lib yourself or
• Use Shared Lib's
• Perhaps it's not supported for Mingw
Edited by exOfde

##### Share on other sites

Edit:

Looks like you can't use it with mingw unless they provide a build for mingw. :-/

Edited by megamoscha

##### Share on other sites

unfortunately I still get undefined references nothing was changed

If its not possible for mingw to use directly could I create a dll for their dll which I can then export the defs for mingw?

##### Share on other sites

The long wall of text below aside, from what i've been able to read so far

you will want a mingw built version of awesomium before doing anything more.

I found that awesomium has an .so version, which means it definitely could be built somewhere for mingw too.

But it looks like it's not. It's built only for vc++ on windows, which means you cannot use it with MinGW.

At least not easily.

------------------

An .a (archive) is sometimes just a collection of object files, while .dll and .so are shared libraries.

Finally, .lib files are _also_ .a files, as it's the same format

If you have a .dll file you will want the entry points to be able to interact with the shared library

Do you have a .dll with exposed entry points?

gendef my.dll    <-- generates my.def

dlltool -l mydll.a -d my.def

Now you can -lmydll with g++ and gcc, as long as gcc finds it

Reading about awesomium, it seems to be in .dll and .so formats

which is windows and linux respectively

##### Share on other sites

@Kaptein Thanks

Im up for a challenge as I really need to get this done im obviously not the most skilled at this but im determined lol.

gendef seems like its exactly what I need I was trying to use pexports and reimp but both seemed like they werent the right way

how can I get gendef its not available in the functions that start with i686-w64-mingw32- is it only on windows?

##### Share on other sites

found the package with gendef mingw-w64-tools

im trying it now!

##### Share on other sites

I did the gendef generated a def file

then used the mingw dlltool to create a .a file

Still the same undefined references

The first one is

/tmp/ccLwLEIi.o:awesomiumwrapper.cpp:(.text+0x481): undefined reference to __imp___ZN9Awesomium7WebCore8ShutdownEv'`

The def has the shutdown defined several times

line 522 ; public: static void __cdecl Awesomium::WebCore::Shutdown(void)
line 523 ?Shutdown@WebCore@Awesomium@@SAXXZ

line 844 _Awe_WebCore_Shutdown@0

Why would it be undefined those look like they would define the shutdown function wouldnt they?

##### Share on other sites
Maybe you could try chromiumembedded?

It uses, like awesomium, chromium under the hood. There is also the project berkelium which was similar like awesomium but it is no longer maintained.

##### Share on other sites

@megamoscha thanks but both of those arnt as polished as awesomium and it feels wrong to be so close with no answer lol

There just has to be a way to fix the definitions so that they can work?

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 11
• 9
• 9
• 39
• ### Forum Statistics

• Total Topics
634129
• Total Posts
3015702
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!