×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    40

    Building DLLs, How?

    hi!

    i am trying to put my common code into libraries for reuse, but i don't quite understand the build path here.

    at present, i am still using CodeWorrier (i mean it...), and managed to compile the source code with EXPORTUNFROZEN defined in the mmp file.
    now i wanted to do a test run to see if i can build the real library.
    i switched over to the command line and invoked abld freeze, which gave me:
    E:\home\peter\CodeWarriorWork\ImLib\group>abld freeze
    make -r -f "\Symbian\7.0s\Series60_v21_CW\EPOC32\BUILD\HOME\PETER\CODEWARRIOR
    WORK\IMLIB\GROUP\WINSCW.make" FREEZE VERBOSE=-s
    make -s -r -f "\Symbian\7.0s\Series60_v21_CW\EPOC32\BUILD\HOME\PETER\CODEWARRIO
    RWORK\IMLIB\GROUP\IMLIBUTIL\WINSCW\IMLIBUTIL.WINSCW" FREEZE
    WARNING: \HOME\PETER\CODEWARRIORWORK\IMLIB\BWINS\IMLIBUTILU.DEF: File not found
    - OK if freezing for first time
    EFREEZE ERROR: \Symbian\7.0s\Series60_v21_CW\EPOC32\BUILD\HOME\PETER\CODEWARRIOR
    WORK\IMLIB\GROUP\IMLIBUTIL\WINSCW\IMLIBUTIL.def: File not found
    make[1]: *** [FREEZE] Error 2
    make: *** [FREEZEIMLIBUTIL] Error 2
    make -r -f "\Symbian\7.0s\Series60_v21_CW\EPOC32\BUILD\HOME\PETER\CODEWARRIOR
    WORK\IMLIB\GROUP\THUMB.make" FREEZE VERBOSE=-s
    make -s -r -f "\Symbian\7.0s\Series60_v21_CW\EPOC32\BUILD\HOME\PETER\CODEWARRIO
    RWORK\IMLIB\GROUP\IMLIBUTIL\THUMB\IMLIBUTIL.THUMB" FREEZE
    WARNING: \HOME\PETER\CODEWARRIORWORK\IMLIB\BMARM\IMLIBUTILU.DEF: File not found
    - OK if freezing for first time
    EFREEZE ERROR: \SYMBIAN\7.0S\SERIES60_V21_CW\EPOC32\BUILD\HOME\PETER\CODEWARRIOR
    WORK\IMLIB\GROUP\IMLIBUTIL\THUMB\IMLIBUTIL.def: File not found
    make[1]: *** [FREEZE] Error 2
    make: *** [FREEZEIMLIBUTIL] Error 2



    what does that mean? i thought, i had to invoke abld freeze to create these .def files ?!?
    unfortunately, the documentation is not very helpful on this one :-(((

  2. #2
    Registered User
    Join Date
    Jul 2004
    Posts
    40
    Really, I think that Symbian application development could be improved a lot if only the documentation would make life easier for new developers. While trying to find out how this def files are created, I finally discovered an explanation of how to create a font from bitmap files with the Adobe BDF format. Of course I implemented my own bitmap 'font' in the meantime because I had to solve the problem in time.

    The CreateStaticDLL example is very simple and compiles cleanly even in the CodeWarrior IDE. No wonder. the def files are already there, So the main difficulties are circumvented.

    My next try was to create an empty .def file, but then I got an internal error from the linker. If I introduce a syntax error into the def file, like changing EXPORTS to EXPORT, I first get an error message about that and THEN an internal linker error.

  3. #3
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hello,

    There is no need to create def files manually. Instead when you build to wins or armi you will get def files generated. Please build your dll project on command prompt, not from IDE.

    Typically the problem is how to updated these def files after you have changed API of that dll. In many times there is need to manually delete def files and re-compile.

    So there will be two def files after you have completed build process on wins and armi. Location will be:
    - yourProject\bmarm
    - yourProject\bwins

    Hope this helps a bit on your hard way to build dll. It is not easy task but when you have succeeded with the first case you can repeat that easyly :-o

    Br V

    P.S And EXPORTUNFROZEN is related to this topic, take a peek to SDK help.

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    40
    During the weekend i have discovered that the error was caused by mixing compiling the code with the CodeWorrier IDE and doing abld freeze from the command line.

    Since I have dumped the IDE and do everything from the command line, everything works fine.

    What's more, I have found that I don't really need a static DLL, but only a static library, so I changed the target from *.dll to *.lib and the targettype from dll to lib.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    11
    The support for .def files in CodeWarrior is pretty confusing in the previous 2.0/2.5 releases. If the EXPORTUNFROZEN directive was not set during the import/project creation, the linker would flag an error during the link stage.

    The workaround for this was to create a new file, name it {project}.def, check to make sure the file extensions was set in the project file mappings, and add it to the project file listing. Then when the link stage was run, copy the missing export entries listed in the error and warning window to the file and relink. Yuk...

    So, this was fixed in the current 2.8 and later releases. If the importer/project creation determines that the target type requires a .def file, i.e. polymorphic dll, exexdll, etc, and if one does not currently exist, the IDE will generate one automatically and add it to the project. And, you can now run a "Freeze {project}.def file" from the IDE, so you do not need to run abld freeze from a shell.

  6. #6
    Registered User
    Join Date
    Jul 2004
    Posts
    40

    codewarrior 2.8?

    i must say that i am confused now. i got 2.5 only a few weeks ago, automatic update never did anything useful, and i never got any note from metrowerks about any updates. i guess that is enough reason to stop using it.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    11
    It sounds like you are using Professional or Personal edition, the 2.8 release was for OEM only. I should have clarified that, however the Professional and Personal 2.8 updates are going to be release in the next week or so, you should get a notice once they are available on the website and through the IDE updater.

    I hope this helps.

  8. #8
    Registered User
    Join Date
    Jul 2004
    Posts
    40

    Too late

    I already have decided to discard CodeWarrior altogether and use command line tools only. Apart from these library problems, I lost code several times when the editor broke down, i never got near the interesting places with the debugger, which sometimes even simply closes with a system error on variable displays, so I had to use debug printouts to log anyway. And on-device-debugging never came close to working.
    This simply is not worth the trouble. I just hope that some time Nokia/Symbian gives full support for linux/unix development so I have a decent shell environment to work with...

Posting Permissions

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