Specs:
OS: Windows 7
IDE: Codeblocks
Compiler: GNU GCC compiler
Library: PDCurses-extended
Library build platform: WinGUI (Windows Graphics Mode) using the Makefile.mng located in PDCurses-master\wingui
Problem:
After installing and linking the PDCurses-extended library, I tried to compile and run a simple Hello World program to check if everything is set up correctly:
#include <curses.h>
int main(){
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
But after trying to compile the code I got the following error:
||=== Build: Debug in pdcurs_test (compiler: GNU GCC Compiler) ===|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `GetStockObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `GetStockObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `Rectangle#20'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `Rectangle#20'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `GetStockObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `GetTextMetricsW#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `DeleteObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `GetTextMetricsW#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcscrn.o):pdcscrn.c|| undefined reference to `DeleteObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `DeleteObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `CreateFontIndirectW#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `ChooseFontW#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `CommDlgExtendedError#0'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `SetTextColor#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `SetBkColor#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `ExtTextOutW#32'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `CreatePen#12'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `MoveToEx#16'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `LineTo#12'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `MoveToEx#16'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `LineTo#12'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `DeleteObject#4'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `SelectObject#8'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `MoveToEx#16'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `LineTo#12'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `MoveToEx#16'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `LineTo#12'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `MoveToEx#16'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `LineTo#12'|
C:\Program Files (x86)\CodeBlocks\PDCurses-master\wingui\pdcurses.a(pdcdisp.o):pdcdisp.c|| undefined reference to `DeleteObject#4'|
||error: ld returned 1 exit status|
||=== Build failed: 41 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
After searching online for a solution, I have found out that I must link the gdi32 library using -lgdi32 in the linker options, but that didn't seem to work. I have also tried to include the windows.h library using
#include <windows.h>
at the beginning of the code, but again to no avail.
Am I even able to utilize the windows GUI using C, or am I required to use C++?
Is the error generated because I made a mistake in making the Makefile, or perhaps linking the library, do I need to install another library, or is it just something I'm still unaware of?
All suggestions are appreciated.
I have resolved my own problem.
I incorrectly linked the gdi32 library.
For anyone having the same problem, go to:
Settings > Compiler > Linker settings > Link libraries > Add >
and find the libgdi32.a (mine was located at C:\Program Files (x86)\CodeBlocks\MinGW\lib)
Related
As part of upgrading a C++ (Microsoft Visual Studio 2010) with nodejs application from node 0.10.26 to node LTS 18.12.1, to compile and build C++ addons, we used node-gyp(node-gyp#9.3.1., Python version 3.11.1. and VS2019 (16.11.32929.386)), when doing node-gyp build, getting below errors:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\rpcndr.h(192,14): error C2872: 'byte': ambiguous symbol
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\rpcndr.h(191,23): message : could be 'unsigned char byte'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\cstddef(28,12): message : or 'std::byte'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\rpcndr.h(962,25): error C2872: 'byte': ambiguous symbol
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\rpcndr.h(191,23): message : could be 'unsigned char byte'
Please suggest possible solutions.
referred below link and tried suggestions from below link, but nothing worked.
https://developercommunity.visualstudio.com/t/error-C2872:-byte:-ambiguous-symbol/93889?ftype=problem&q=C%3A%5CProgram+Files+%28x86%29%5CWindows+Kits%5C10%5CInclude%5C10.0.19041.0%5Cshared%5Crpcndr.h%28192%2C14%29%3A+error+C2872%3A+%27byte%27%3A+ambiguous+symbol
Currently I am trying to use the C standard library in my EDK2 project.
As my Visual Studio 2019 did not automatically add the necessary include directories,
I manually added the following folders to my include directories:
C:\edk2\MdePkg\Include\X64
C:\edk2\MdePkg\Include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\atlmfc\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\VS\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um
As this fixed my missing #include directives, the only thing left for me was to manually
add the missing libraries to the linker arguments.
I did this as follows:
1.) After a quick Google search i found out, that I have to link my application against libucrt.lib, which i then tried to locate inside of my Windows 10 SDK by performing a simple search, which yielded me the following results:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64
As a result, I added this directory to my library directories inside Visual Studio 2019.
Not to forget, I added libucrt.lib as well:
My problem is, that after compiling my project, I still get an error from the linker:
I already tried out using different include directories, as well as different Windows SDK versions,
but none seemed to solve my problem.
I am grateful for any kind of help, thank you.
I settled on implementing the functions I needed from the stdlib myself, as #user123 proposed, in order to solve this problem and save me a lot of time.
I would like to make C program for the cortex - M0 processor. I work with 64-bit window machine and Eclipse. I found many things on internet and I am confused:
1.MinGW
2.ARM GCC compiler for windows (which can be set in the advanced system in computer, the PATH variable)
3. ARM GNU compiler from Eclipse market
Among all this , Which compiler can be used for ARM and can I output my results on command line. i.e Can I compile the program and produce results on the console ?
This result below is what I get when I try to compile a hello program using the command: arm-none-eabi-gcc -o -tesres -test.c
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In functio
n `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-sbrkr.o): In functi
on `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-writer.o): In funct
ion `_write_r':
writer.c:(.text._write_r+0x24): undefined reference to `_write'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-closer.o): In funct
ion `_close_r':
closer.c:(.text._close_r+0x18): undefined reference to `_close'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-fstatr.o): In funct
ion `_fstat_r':
fstatr.c:(.text._fstat_r+0x20): undefined reference to `_fstat'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-isattyr.o): In func
tion `_isatty_r':
isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-lseekr.o): In funct
ion `_lseek_r':
lseekr.c:(.text._lseek_r+0x24): undefined reference to `_lseek'
c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/ar
m-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-readr.o): In functi
on `_read_r':
readr.c:(.text._read_r+0x24): undefined reference to `_read'
collect2.exe: error: ld returned 1 exit status
You can use the ARM GNU compiler from Eclipse marketplace. When this is installed, you can Create a new C/C++ project with the correct Project type -
e.g. Executable/STM32F0xx C/C++ project if that's the series of chip you wish to target. Make sure Trace output in the wizard is NOT set to None (no trace output). You can then use trace_printf to write to host console via ST-LINK, as the hello-world example will show.
You may also have to install and configure OpenOCD to capture that output and display it in Eclipse's console. In Eclipse, you just set up an external tool Run > External tools > External tools configuration. Specify the location of openocd.exe, set the working directory and, in Arguments, specify which devkit you're using by using the appropriate config file, e.g. -f board\stm32f072discovery.cfg.
Then build, run OpenOCD and debug.
Under Windows for M0 I've been using IAR Embedded Workbench, which was a nice and smooth experience for me. But as far as I remember it needed a license.
https://en.wikipedia.org/wiki/List_of_ARM_Cortex-M_development_tools
Maybe you should look for free options in this list.
I am new to Windows driver development and minifilters and I am trying to build the nullFilter sample using command line tools.
So I added #pragma comment(lib, "FltMgr.lib") to the .c file and issued the following commands successfully:
cl.exe /nologo /Fo../../bin\filter.obj /c filter.c /D _AMD64_
rc.exe /nologo /Fo../../bin\filter.res filter.rc
However, when I try to create the sys file:
link.exe /nologo /DRIVER:WDM /out:../../bin\filter.sys ../../bin\filter.obj ../../bin\filter.res
LINK : error LNK2001: unresolved external symbol NtProcessStartup
../../bin\filter.sys : fatal error LNK1120: 1 unresolved externals
I am using VS2012 Express and WDM8. My LIB environment variable is:
C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64;C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\km\x64;
What am I doing wrong? Am I missing something?
NtProcessStartup function is to driver development what 'main' is for regular C programs. In other words, it is the program entry function that you need to provide yourself. See the article here for an introduction and explanation of this function. You can overrule the name of the startup function by using the -entry linker option. Setting '-entry:DriverEntry' is a common practice for driver development.
I've been trying to ressurect a XP-era .dll that uses Microsoft's Uniscribe, prossible VCL and other artifacts to do some transliteration. It was compiled at the time with some Borland toolchain and the project i was handed includes .res files from Visual Studio, .mrt and .mbt files which also seem to be GUI-related, .ide files which are Borland C++ Project files, .dsw Turbo C Context files (opening 'em in a text editor - they could also be VC6 files... shuders), .bpr BCB.04.04 / BCB IDE files, .dfm font-related files and .bpg BWS.01 files. I feel like a digital Indiana Jones, minus the whip and dust makes me sneeze.
I got a Borland toolchain from Embarcadero and was using Code::Blocks, only somewhere among the line -Weverything gets into the compiler arguments, which the Borland doesn't like.
LLVM's Clang currently barfs on winnt.h (which i'd rather not edit), on stuff like
\um\winnt.h:1341:1: error: C++ requires a type specifier for all declarations
Visual Studio's compiler barfs on something else entirely (didn't bother with it much, though) and i don't remember where did MinGW/GCC stop.
I've had to fiddle with includes and libs (mostly the ones from Embarcadero's include\ and lib) and compiler flags (currently _NO_VCL _MSC_VER=1200 BUILD_DLL) on account of a bunch or different errors and won't even bother with the warnings. Using the cmd line to compile this project (with one of the .bpr files and Embarcadero's documentation as reference) i managed to compile an .obj with this:
"C:\path\to\bcc32.exe" -w -tWM -tWD -y -vi- -v -a8 -r- -Od -D_NO_VCL -D_MSC_VER=1200
-I"C:\path\to\include\windows\crtl"
-I"C:\path\to\include\windows\vcl"
-I"C:\path\to\include\windows\rtl"
-I"C:\path\to\baseProjectDir"
-I"C:\path\to\baseProjectDir\subDir"
-oobj\Debug\myFile.obj -c ..\file1.cpp ..\subDir\file2.cpp ..\subDir\file3.cpp ..\subDir\file4.cpp
Yay. The fun continues when i try linking:
"C:\path\to\ILINK32.EXE" /aa /Tpd /x /Gn /Gi /q
/L"C:\path\to\baseProjectDir;C:\path\to\baseProjectDir\subDir;C:\path\to\lib\win32\debug;C:\path\to\lib\win32\release"
"C:\path\to\myFile.obj"
i get:
Error: Unresolved external '__turboFloat' referenced from root
Error: Unable to perform link
Googlefu tells me this is some sort of Borland vendor lock-in thing, so i changed my link line to:
"C:\path\to\ILINK32.EXE" /aa /Tpd /x /Gn /Gi /q
/L"C:\path\to\baseProjectDir;C:\path\to\baseProjectDir\subDir;C:\path\to\lib\win32\debug;C:\path\to\lib\win32\release"
"C:\path\to\lib\win32\release\c0d32.obj" "C:\path\to\myFile.obj"
...and now it really hits the fan:
Error: Unresolved external '__dbk_fcall_wrapper' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external 'GetVersion' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__ErrorMessage' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_DLL_Lock' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_VCL_Init' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_MEM_UseBorMM' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_VCLLIB_Linkage' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__ExceptInit' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__pRawDllMain' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__startupd' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__free_heaps' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_VCL_Exit' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_DLL_Unlock' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external 'HeapAlloc' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_TLS_SetValue' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_TLS_InitThread' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external 'GetProcessHeap' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external 'HeapFree' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_TLS_ExitThread' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_TLS_Free' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_TLS_Alloc' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external 'DllEntryPoint' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__argv_expand_ptr' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__wargv_expand_ptr' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__handle_setargv' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__handle_exitargv' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__handle_wsetargv' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__handle_wexitargv' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__fileinfo' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '___CRTL_TLS_GetValue' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\17.0\LIB\WIN32\RELEASE\C0D32.OBJ
Error: Unresolved external '__turboFloat' referenced from root
Error: Unable to perform link
I'm kind of at a loss here. Any hints would be much appreciated.
After some pointers from the forums and a 11 years old post i added some extra .obj to the link line, namely cw32mt.lib and import32.lib, so that the final line looks something like this (YMMV):
ilink32.exe -q
-L"C:\path\to\lib\win32c\debug"
-L"C:\path\to\lib\win32\debug"
-LC:\MinGW\lib
-LC:\path\to\myProject
-Tpd /DEBUG
obj\Debug\subDir\file1.obj
obj\Debug\subDir\file2.obj,
bin\Debug\final.dll,,C:\path\to\myProject\some.lib
"C:\path\to\lib\win32c\debug\cw32mti.lib"
"C:\path\to\lib\win32c\debug\import32.lib",,
It is one single line, with some ,, and no spaces. Code::Blocks was handy too.