Menu

How to make a DLL?

2003-01-13
2012-09-26
  • Nobody/Anonymous

    Hi,
       I am a newer to Dev-C++, I want to use Dev-C++ to
    build my dll.
       But if I add WinAPI functions (for example, TextOutA, GetTextExtentPoint32A, etc.), the complier will give me an error: "[Linker error] undefined reference to `TextOutA@16'" , Why I couldn't use WinAPI in my dll? 
       Thanks for help!

     
    • Patrick Ogay

      Patrick Ogay - 2003-01-13

      Do you know, what the linker has to do?
      mainly resolve unresolved references like  `TextOutA@16'".
      To resolve these you have to provide the correct libs in the linker options.

      for creating DLLs I found just this link:
      http://webclub.kcom.ne.jp/ma/colinp/win32/dll/make.html
      Pat

       
    • Nobody/Anonymous

      Thank you!

      If I change the Win32 DLL to Win32 static lib (in  "project properties" Tab), there is no problem.

       
    • Nobody/Anonymous

      The detail compile information:

      Building Makefile: "D:\EdrTest\Makefile.win"
      Executing  make...
      make.exe -f "D:\EdrTest\Makefile.win" all
      dllwrap.exe --output-def libTest.def --implib libTest.a EdrLib.o  -L"C:/Dev-Cpp/lib" -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias -o Test.dll

      EdrLib.o(.text+0x3b):EdrLib.c: undefined reference to `GetTextExtentPoint32A@16'

      dllwrap.exe: no export definition file provided
      dllwrap.exe: creating one, but that may not be what you want
      dllwrap.exe: gcc exited with status 1

      make.exe: *** [Test.dll] Error 1

      Execution terminated

       
    • Nobody/Anonymous

      The detail compiling information:

      Building Makefile: "D:\EdrTest\Makefile.win"
      Executing  make...
      make.exe -f "D:\EdrTest\Makefile.win" all
      dllwrap.exe --output-def libTest.def --implib libTest.a EdrLib.o  -L"C:/Dev-Cpp/lib" -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias -o Test.dll

      EdrLib.o(.text+0x3b):EdrLib.c: undefined reference to `GetTextExtentPoint32A@16'

      dllwrap.exe: no export definition file provided
      dllwrap.exe: creating one, but that may not be what you want
      dllwrap.exe: gcc exited with status 1

      make.exe: *** [Test.dll] Error 1

      Execution terminated

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.