Jump to content
  • Advertisement
Sign in to follow this  
jeff8j

MinGW and .libs

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
  • 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 this post


Link to post
Share on other sites

I found a tool which made a .a file https://code.google.com/p/lib2a/

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

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!