Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2005

    Exclamation DLL loading: KErrCorrupt

    For a few days now I'm searching for a solution for my problem, but I didn't find anything.

    I have a DLL project I compiled with Carbide.c++ and an EXE project also compiled with Carbide.c++. Both are for S60 3rd Edition.
    If I link my EXE against the DLL (or the DSO to be correct), I have no problem unless I use one exported function in the EXE. If I do so, starting the EXE causes KErrCorrupt. But I do not have this problem if I load the DLL by using RLibrary::Load(), it just works!

    I have really no idea why this doesn't work. In thread 72394 of this forum I read, it may be a Carbide.c++ problem; is this a known bug or am I doing anything wrong?

    To provide you with the most accurate information, here the output of Carbide.c++ when I'm compiling the DLL:
    **** Full rebuild of configuration S60 3.0 Phone (GCCE) Release for project LogClient ****
    make -k clean all 
    del /s/q  .\src\LogClient.o .\src\LogClientDllMain.o  C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\sis\LogClient.sis  C:\Symbian\9.1\S60_3rd\epoc32\release\GCCE\UREL\EvLogClient.dll
    Could Not Find C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\S60 3.0 Phone (GCCE) Release\src\LogClient.o
    Deleted file - C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\sis\LogClient.sis
    Could Not Find C:\Symbian\9.1\S60_3rd\epoc32\release\GCCE\UREL\EvLogClient.dll
    ' '
    'Building file: ../src/LogClient.cpp'
    'Invoking: GCCE Compiler'
    arm-none-symbianelf-g++.exe -c -pipe -mapcs -nostdinc -x c++ -march=armv5t -fexceptions -mfloat-abi=soft -D_DEBUG -D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__MARM_ARMV5__ -D__DLL__ -D__SUPPORT_CPP_EXCEPTIONS__ -D__SERIES60_30__ -D__SERIES60_3X__ -D__PRODUCT_INCLUDE__=\"C:\Symbian\9.1\S60_3rd\epoc32\include\variant\Symbian_OS_v9.1.hrh\" -include "C:\Symbian\9.1\S60_3rd\\EPOC32\INCLUDE\GCCE\GCCE.h" -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas -I "C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\inc" -I "C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\..\LogServer\inc\common" -I "C:\Symbian\9.1\S60_3rd\epoc32\include" -I "C:\Symbian\9.1\S60_3rd\epoc32\include\variant" -I "C:\Program Files\CSL Arm Toolchain\lib\gcc\arm-none-symbianelf\3.4.3\include" -o src/LogClient.o ../src/LogClient.cpp
    'Finished building: ../src/LogClient.cpp'
    ' '
    'Building file: ../src/LogClientDllMain.cpp'
    'Invoking: GCCE Compiler'
    arm-none-symbianelf-g++.exe -c -pipe -mapcs -nostdinc -x c++ -march=armv5t -fexceptions -mfloat-abi=soft -D_DEBUG -D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__MARM_ARMV5__ -D__DLL__ -D__SUPPORT_CPP_EXCEPTIONS__ -D__SERIES60_30__ -D__SERIES60_3X__ -D__PRODUCT_INCLUDE__=\"C:\Symbian\9.1\S60_3rd\epoc32\include\variant\Symbian_OS_v9.1.hrh\" -include "C:\Symbian\9.1\S60_3rd\\EPOC32\INCLUDE\GCCE\GCCE.h" -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas -I "C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\inc" -I "C:\Symbian\9.1\S60_3rd\MyProjects\LogClient\..\LogServer\inc\common" -I "C:\Symbian\9.1\S60_3rd\epoc32\include" -I "C:\Symbian\9.1\S60_3rd\epoc32\include\variant" -I "C:\Program Files\CSL Arm Toolchain\lib\gcc\arm-none-symbianelf\3.4.3\include" -o src/LogClientDllMain.o ../src/LogClientDllMain.cpp
    'Finished building: ../src/LogClientDllMain.cpp'
    ' '
    'Invoking: GCCE Linker'
    arm-none-symbianelf-ld.exe --check-sections --no-undefined --no-allow-shlib-undefined -nostdlib -shared --entry _E32Dll -Tdata 0x400000 -Ttext 0x8000 --target1-abs --discard-locals --default-symver -u_E32Dll -L"C:\Program Files\CSL Arm Toolchain\lib\gcc\arm-none-symbianelf\3.4.3" -L"C:\Program Files\CSL Arm Toolchain\arm-none-symbianelf\lib"  -soname "EvLogClient{000a0000}.dll" -o "EvLogClient.sym" -Map C:\Symbian\9.1\S60_3rd\epoc32\release\GCCE\UREL\\EvLogClient.dll.map  ./src/LogClient.o ./src/LogClientDllMain.o   "C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\UREL\edll.lib" C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\dfpaeabi.dso C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\drtaeabi.dso C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\dfprvct2_2.dso C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\scppnwdl.dso C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\drtrvct2_2.dso C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\UREL\usrt2_2.lib C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\euser.dso -lsupc++ -lgcc
    'Finished building: EvLogClient.sym'
    ' '
    'Building target: C:/Symbian/9.1/S60_3rd/epoc32/release/GCCE/UREL/EvLogClient.dll'
    'Invoking: Post linker'
    elf2e32.exe --targettype=DLL --libpath="C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB" --capability=NONE --uid1=0x10000079 --uid2=0x1000008D --uid3=0x200085D5 --sid=0x200085D5 --vid=0x00000000  --elfinput="EvLogClient.sym" --defoutput=EvLogClient{000a0000}.def --dso=C:\Symbian\9.1\S60_3rd\epoc32\release\ARMV5\LIB\EvLogClient.dso --output="C:/Symbian/9.1/S60_3rd/epoc32/release/GCCE/UREL/EvLogClient.dll" --linkas=EvLogClient{000a0000}[0x200085D5].dll
    'Finished building target: C:/Symbian/9.1/S60_3rd/epoc32/release/GCCE/UREL/EvLogClient.dll'
    ' '
    'Building file: sis/LogClient.pkg'
    'Invoking: CreateSis (Installation File Generator)'
    createsis create -cert C:\Symbian\9.1\S60_3rd\Certificate\AscomN80DevCert.cer -key C:\Symbian\9.1\S60_3rd\Certificate\ACSPublisherIDPrivateKey.pfx.key "sis/LogClient.pkg" C:/Symbian/9.1/S60_3rd/MyProjects/LogClient/sis/LogClient.sis
    Processing sis/LogClient.pkg...
    Created sis/LogClient-tmp.SIS
    Signing sis/LogClient-tmp.SIS with C:\Symbian\9.1\S60_3rd\Certificate\AscomN80DevCert.cer and C:\Symbian\9.1\S60_3rd\Certificate\ACSPublisherIDPrivateKey.pfx.key -> C:/Symbian/9.1/S60_3rd/MyProjects/LogClient/sis/LogClient.sis
    'Finished building: sis/LogClient.pkg'
    ' '
    Build complete for project LogClient

  2. #2
    Regular Contributor
    Join Date
    Jan 2005

    Re: DLL loading: KErrCorrupt


    Did u sloved this problem, i am having same problem. i am using codewarrior to compile my dll and my exe. When i am trying to load my dll it is giving
    me kerrcorrupt.

    If u have sorted this out. plz guide me.

    Thanks in advance

  3. #3
    Registered User
    Join Date
    Jun 2005

    Re: DLL loading: KErrCorrupt

    Sorry, jugnoyasir.

    I haven't solved this in a good way: I made a new project (the one that uses the DLL, not the DLL project) with a new name and tried again, now it works; there must have been some files that confused the compiler, but I couldn't find them (or I thought I deleted all of them). So, for me it was the easiest way to get around this.

    Hope, this helps anyway.

Similar Threads

  1. PC Suite error: (Code: Init IMediaControl2) HELP?!
    By chunkyspudmonkey in forum General Development Questions
    Replies: 30
    Last Post: 2014-07-15, 05:44
  2. Compilation series 60 3rd edition
    By asmobease in forum Symbian Tools & SDKs
    Replies: 32
    Last Post: 2006-09-13, 09:46
  3. Linking Static DLL with another Static DLL
    By symbianfresher in forum Symbian
    Replies: 6
    Last Post: 2006-01-09, 04:23
  4. what happens to TLS when DLL is unloaded?
    By rtillitt in forum Symbian
    Replies: 1
    Last Post: 2002-11-27, 12:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts