Use #ifdef _MSC_VER instead of _IRR_WINDOWS_ when linking lib's with a pragma comment. Thx @AReichl for reporting.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5059 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2015-03-02 13:43:29 +00:00
parent c1c8ec280b
commit f4687fb2e9
10 changed files with 14 additions and 12 deletions

View File

@ -77,7 +77,7 @@ of the console window, which pops up when starting a program with main(). This
is done by the second pragma. We could also use the WinMain method, though
losing platform independence then.
*/
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif

View File

@ -21,7 +21,7 @@ using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif

View File

@ -19,7 +19,9 @@ windows book for details.
using namespace irr;
#ifdef _MSC_VER
#pragma comment(lib, "irrlicht.lib")
#endif
HWND hOKButton;
HWND hWnd;

View File

@ -12,7 +12,7 @@
#ifdef USE_IRRKLANG
#include <irrKlang.h>
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment (lib, "irrKlang.lib")
#endif
@ -22,7 +22,7 @@ struct soundfile: public IFileReader
{
soundfile ( io::IReadFile* f ): file (f ) {}
virtual ~soundfile () { file->drop (); }
virtual ik_s32 read(void* buffer, ik_u32 sizeToRead) { return file->read ( buffer, sizeToRead ); }
virtual bool seek(ik_s32 finalPos, bool relativeMovement = false) { return file->seek ( finalPos, relativeMovement ); }
virtual ik_s32 getSize(){ return file->getSize (); }
@ -46,7 +46,7 @@ struct klangFactory : public irrklang::IFileFactory
IrrlichtDevice *Device;
};
ISoundEngine *engine = 0;
ISound *backMusic = 0;

View File

@ -14,7 +14,7 @@ using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif

View File

@ -18,7 +18,7 @@ using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif

View File

@ -54,7 +54,7 @@ collecting profiling information is disabled by default for speed reasons.
#include <irrlicht.h>
#include "driverChoice.h"
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif

View File

@ -21,7 +21,7 @@ using namespace irr;
#include <irrKlang.h> // problem here? go to http://www.ambiera.com/irrklang and download
// the irrKlang library or undefine USE_IRRKLANG at the beginning
// of this file.
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment (lib, "irrKlang.lib")
#endif
#endif

View File

@ -13,7 +13,7 @@
using namespace irr;
#ifdef _WIN32
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )

View File

@ -9,7 +9,7 @@ using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif
@ -98,7 +98,7 @@ int main(int argc, char* argv[])
IMeshWriter* mw = device->getSceneManager()->createMeshWriter(type);
IWriteFile* file = device->getFileSystem()->createAndWriteFile(argv[destmesh]);
mw->writeMesh(file, mesh);
file->drop();
mw->drop();
device->drop();