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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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!
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
Thank you!
If I change the Win32 DLL to Win32 static lib (in "project properties" Tab), there is no problem.
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
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