The Hekkus Library doesn't work when used with the Optimized Compiler

Discussion in 'Questions (Windows Mobile)' started by Louis, Dec 27, 2007.

  1. Louis

    Louis Active Member Licensed User

    Hi Erel, When usng the Hekkus Wrapper I created using the Legacy compiler in v6.01, there are no problems. However when used with the Optimized compiler, I get the following error:
    External compiler error
    Error compiling program. Error message: error CS0246: The type or namespace name 'hssNET' could not be found (are you missing a using
    directive or an assembly reference?)
    Line number: 17
    Line: s1 = Speaker.SpeakerPlaySound(Sound1.SoundValue)
    OK
    How can I fix this from within my Library? Thanks.
     
  2. Cableguy

    Cableguy Expert Licensed User

    Hi,
    Has I understand it, legacy compilation is for some backwards compatibility with net 1.1 dlls...
    optimized compilation use target default the net 2.0 framework...
    So you should re-compile your dll as an .net 2.o dll and make the necessary adjustments..
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    There is no problem with .Net 1.0 libraries.
    You should make sure that both projects (desktop and device) use the same namespace.
     
  4. Cableguy

    Cableguy Expert Licensed User

    I stand corrected, thanks EREL
     
  5. Louis

    Louis Active Member Licensed User

    Hi, Thanks for the suggestions. I re-submitted a better version of my Hekkus Wrapper with a Basic4ppc example of how it can be used. As you will see, the compiled executables are compiled using the non-optimized compiler. ry
    compiling my example with the Optimized Compiler, you will see that you get an executable. Run the executable and it immediately crashes! It's weird. It crashes regardless of whether the library was compiled for .NET 1.1 or 2.0.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You should not change the name of the result dll yourself.
    The name should be identical to the assembly name (in the Project Properties page).
     
Loading...