Thanks for the help Alexandre.
Look man, it could not have at a better time; porting the code from VC++ to g++
has not been a easy thing for me, I am so used to the flexibility of VS that
now that I am using the actual C++ standard I realize the facilities and traps
provided Microsoft. The last step of this process is the Win32/64 library the
company uses, and in my honest opinion GCC *should provide the same facilities
that Microsoft provides when it comes to the API, after all, it is their API
for Windows OS. Nonetheless, thanks to your help the porting has become much
easier, thanks man.
From: Alexandre Pereira Nunes
Sent: Monday, June 29, 2015 8:04 PM
To: [email protected]
Subject: Re: [Mingw-w64-public] More porting problems :(
It seems like you're not passing -lwinmm to the linker. I use this:
LDFLAGS := -Wl,--as-needed -lgdi32 -lcomdlg32 -lws2_32 -lwinmm
-Wl,--no-as-needed
to selectively link these libraries. I'm not sure if the "as-needed" logic is
required on windows, but it works for me™.
What it does is only reference these libraries as a dependency if your program
needs symbols for them).
Em seg, 29 de jun de 2015 às 20:53, <[email protected]> escreveu:
The latest MinGW64 complains about this code:
#include <windows.h>
#include <mmsystem.h>
#include <Mmsystem.h>
bool abc::Sound::PlayIt(){
//return !!sndPlaySoundW(Soundfile.c_str(), SND_FILENAME);
return !!PlaySoundW(Soundfile.c_str(), NULL, SND_FILENAME/*SND_ASYNC*/);
}
It says
In function `abc::Sound::PlayIt()':
C:/Win32/sound.cpp:28: undefined reference to `__imp_PlaySoundW'
This code compiles under VS, it should under g++ 5.1.
------------------------------------------------------------------------------
This email has been checked for viruses by Avast antivirus software.
www.avast.com
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
--------------------------------------------------------------------------------
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
--------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public