Can I include an obj file I created in Visual C++? Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
TexasJimbo
Knows some wx things
Knows some wx things
Posts: 28
Joined: Sun May 04, 2008 6:41 pm

Can I include an obj file I created in Visual C++?

Post by TexasJimbo » Sat Mar 24, 2012 4:43 pm

I am using wxWidgets via DialogBlocks using MinGW compiler. I needed a new class to handle playing mp3 content from memory. I found a code sample that was close to what I needed and made some modifications so it is almost exactly what I need, and was able to build it using Visual C++. So now I have an object file. Can I use that object file along with the other object files created via MinGW to add it to my wxWidgets project?

I tried to build this class directly using wxWidgets in my enviornment but get all sorts of errors....starting with
wmsdk.h:No such file or directory
'WMSyncReader' was not declared in this scope.

I tried modifying the include path to point to the location of the SDK Include files where I verified the wmsdk.h file was located, but when I did this, my project would not build.

Bottom line is I am not sure I can use this new Visual C++ class in my existing wxWidgets Project.
Has anyone else had to do something similar - were you able to get this to work / how?

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2650
Joined: Sun Jan 03, 2010 5:45 pm

Re: Can I include an obj file I created in Visual C++?

Post by PB » Sat Mar 24, 2012 4:58 pm

I'm afraid that linking VC++ .obj file with GCC is not possible. I believe that closest you can come is to create a DLL and DEF in Visual C++ and use that in MinGW but that would be certainly an overkill for a just a single class.

Also I would be surprised if GCC could use include files from MS Platform SDK, as they are full of VC++ specific extensions. On the other hand, you could try to adapt those files so they would compile with GCC but this can prove to be a time-consuming or even impossible task.

I am just guessing here, but if all you need is to play MP3 from memory, there should be few free robust solutions out there.

TexasJimbo
Knows some wx things
Knows some wx things
Posts: 28
Joined: Sun May 04, 2008 6:41 pm

Re: Can I include an obj file I created in Visual C++?

Post by TexasJimbo » Tue Mar 27, 2012 12:21 am

I was afraid that was going to be the response - but I do appreciate your reply!

Post Reply