DEVIL ILUT Loader C++ Windows Forms



  • Hallo,

    habe mit VisualStudio 2005
    in C++ ein Windows Forms Projekt erstellt.
    2 OpenGL Panels eingebettet
    welche von 2 Klassen instanziert werden.

    geht auch super

    nun möchte ich eine Textur laden.
    in C# habe ich das ganze mit dem Tao Framework gemacht
    daher kenne ich den Devil Loader

    nun in C++ hab ich den ILUT DEVIL Loader eingebunden
    aktuelle Version gerade geladen.

    dann bekam ich dne fehler dass die config.h nicht gelden werden kann?
    ich fand eine config.h.win ??
    in der steht:

    /* include/IL/config.h.  Generated by configure.  */
    /* include/IL/config.h.in.  Generated from configure.in by autoheader.  */
    #ifndef __CONFIG_H__
    #define __CONFIG_H__
    
    /* Supported images formats (il) */
    
    /* #undef IL_NO_BMP */
    /* #undef IL_NO_CUT */
    /* #undef IL_NO_CHEAD */
    /* #undef IL_NO_DCX */
    /* #undef IL_NO_DDS */
    /* #undef IL_NO_DOOM */
    /* #undef IL_NO_GIF */
    /* #undef IL_NO_HDR */
    /* #undef IL_NO_ICO */
    /* #undef IL_NO_JPG */
    /* #undef IL_NO_LCMS */
    /* #undef IL_NO_LIF */
    /* #undef IL_NO_MDL */
    /* #undef IL_NO_MNG */
    /* #undef IL_NO_PCD */
    /* #undef IL_NO_PCX */
    /* #undef IL_NO_PIC */
    /* #undef IL_NO_PIX */
    /* #undef IL_NO_PNG */
    /* #undef IL_NO_PNM */
    /* #undef IL_NO_PSD */
    /* #undef IL_NO_PSP */
    /* #undef IL_NO_PXR */
    /* #undef IL_NO_RAW */
    /* #undef IL_NO_SGI */
    /* #undef IL_NO_TGA */
    /* #undef IL_NO_TIF */
    /* #undef IL_NO_WAL */
    /* #undef IL_NO_XPM */
    #define IL_USE_JPEGLIB_UNMODIFIED 1
    
    /* Supported api (ilut) */
    
    //
    // sorry just
    // cant get this one to work under windows
    // have disabled for the now
    //
    // will look at it some more later
    //
    // Kriss
    //
    #undef ILUT_USE_ALLEGRO
    
    #define ILUT_USE_DIRECTX8 1
    #define ILUT_USE_DIRECTX9 1
    #define ILUT_USE_OPENGL 1
    #define ILUT_USE_SDL 1
    #define ILUT_USE_WIN32 1
    
    /* Define to 1 if you have the <dlfcn.h> header file. */
    #define HAVE_DLFCN_H 1
    
    /* Define to 1 if you have the <inttypes.h> header file. */
    #define HAVE_INTTYPES_H 1
    
    /* Define to 1 if you have the <memory.h> header file. */
    #define HAVE_MEMORY_H 1
    
    /* Define to 1 if you have the <stdint.h> header file. */
    #define HAVE_STDINT_H 1
    
    /* Define to 1 if you have the <stdlib.h> header file. */
    #define HAVE_STDLIB_H 1
    
    /* Define to 1 if you have the <strings.h> header file. */
    #define HAVE_STRINGS_H 1
    
    /* Define to 1 if you have the <string.h> header file. */
    #define HAVE_STRING_H 1
    
    /* Define to 1 if you have the <sys/stat.h> header file. */
    //#define HAVE_SYS_STAT_H 1
    
    /* Define to 1 if you have the <sys/types.h> header file. */
    //#define HAVE_SYS_TYPES_H 1
    
    /* Define to 1 if you have the <unistd.h> header file. */
    //#define HAVE_UNISTD_H 1
    
    /* Name of package */
    #define PACKAGE "DevIL"
    
    /* Define to the address where bug reports for this package should be sent. */
    #define PACKAGE_BUGREPORT ""
    
    /* Define to the full name of this package. */
    #define PACKAGE_NAME ""
    
    /* Define to the full name and version of this package. */
    #define PACKAGE_STRING ""
    
    /* Define to the one symbol short name of this package. */
    #define PACKAGE_TARNAME ""
    
    /* Define to the version of this package. */
    #define PACKAGE_VERSION ""
    
    /* Define to 1 if you have the ANSI C header files. */
    #define STDC_HEADERS 1
    
    /* Version number of package */
    #define VERSION "1.6.7"
    
    /* Define to 1 if your processor stores words with the most significant byte
       first (like Motorola and SPARC, unlike Intel and VAX). */
    /* #undef WORDS_BIGENDIAN */
    
    /* If using Mac OS X uncomment this line */
    /* #include "macconfig.h" */
    
    /* Define to 1 if the X Window System is missing or not being used. */
    /* #undef X_DISPLAY_MISSING */
    #endif /* __CONFIG_H__ */
    

    das

    sorry just
    // cant get this one to work under windows
    // have disabled for the now

    machte mich ein wenig stuzig?
    aber im C# geht es ja auch
    nur eben mit dme Tao Framwork

    habe die Datei von config.h.win
    nach config.h umbenannt
    daraufhin ->
    gibt mir der Compiler lauter Linkerfehler aus???
    hab die Include Dateien in IL\.* gespeichert und die libs auch entsprechend.

    sobald ich die Dateien
    in meiner OpenGL Klasse

    einfüge

    #pragma once
    #include <IL/il.h>
    

    bringt er mir schon den Fehler

    Fehler	1	error LNK2028: Nicht aufgelöstes Token (0A00005B) ""extern "C" void __stdcall ilInit(void)" (?ilInit@@$$J10YGXXZ)", auf das in Funktion ""protected: bool __clrcall OpenGLForm::Trackball::InitGL(void)" (?InitGL@Trackball@OpenGLForm@@$$FI$AAM_NXZ)" verwiesen wird.	OpenGL_on_a_Windows_Form.obj	
    
    Fehler	2	error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" void __stdcall ilInit(void)" (?ilInit@@$$J10YGXXZ)" in Funktion ""protected: bool __clrcall OpenGLForm::Trackball::InitGL(void)" (?InitGL@Trackball@OpenGLForm@@$$FI$AAM_NXZ)".	OpenGL_on_a_Windows_Form.obj	
    
    Fehler	3	fatal error LNK1120: 2 nicht aufgelöste externe Verweise.	C:\Dokumente und Einstellungen\Matze\Desktop\Debug\Projekt.exe
    

    was mach ich falsch?

    meine Klasse und der Constructor:

    #pragma once
    
    #include <windows.h>
    #include <GL/gl.h>
    #include <GL/glu.h>
    #include <IL/il.h>
    
    using namespace System::Windows::Forms;
    
    namespace OpenGLForm 
    {
    	public ref class Trackball: public System::Windows::Forms::NativeWindow
    	{
    		public: Trackball::Trackball(System::Windows::Forms::Panel ^ parentForm)
    				{
    						m_hDC = GetDC((HWND)parentForm->Handle.ToPointer());
    						if(m_hDC)
    						{
    							MySetPixelFormat(m_hDC);
    							ReSizeGLScene(parentForm->Width, parentForm->Height);
    							InitGL();
    							//ilInit();
    
    						/*	iluInit();
    							ilutInit();
    							ilutRenderer(ILUT_OPENGL);
    							ilutRenderer(ILUT_WIN32);
    					  		texture = ilutGLLoadImage(TEXT("C:\\map.rgb"));*/
    
    						}
    					rtri = 0.0f;
    					rquad = 0.0f;
    				}
    

    Vielen Dank
    Matthias Asselborn



  • ah hat sich erledigt - hab die 3 libs von ILUT von Hand eingetragen 😉
    nun gehts


Anmelden zum Antworten