Hi. I have a Win 10 system with CB. A project that uses a dll (compiled with another project) works fine when operated from CB (with the green arrow) but fails with a Command Prompt mode of operation.
The following gives some data from my system;
The build =======>
g++.exe -Wall -fexceptions -g -c C:\u\CodeBlock_C++\DLL\02_Console\main.cpp -o obj\Debug\main.o
g++.exe -o bin\Debug\Console.exe obj\Debug\main.o C:\u\CodeBlock_C++\DLL\02_Console\bin\Debug\libCreateUse.a
Output file is bin\Debug\Console.exe with size 72.99 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
OK operation with green arrow (cb) =======>
a= 22
b= 11
the sum is 33
a= 44
b= 22
the difference is 22
NOK operation with Command Prompt ========>
C:\u\CodeBlock_C++\DLL\02_Console\bin\Debug>dir
Volume in drive C is OS
Volume Serial Number is 5484-444A
Directory of C:\u\CodeBlock_C++\DLL\02_Console\bin\Debug
08-May-24 02:59 PM <DIR> .
08-May-24 02:59 PM <DIR> ..
08-May-24 02:59 PM 74,745 Console.exe
08-May-24 02:15 PM 59,052 CreateUse.dll
08-May-24 02:15 PM 2,384 libCreateUse.a
3 File(s) 136,181 bytes
2 Dir(s) 148,093,124,608 bytes free
C:\u\CodeBlock_C++\DLL\02_Console\bin\Debug>console.exe
C:\u\CodeBlock_C++\DLL\02_Console\bin\Debug>console.exe
The NOK operation with the last bit of the above is a mystery ??
The OK operation atleast asked the operator for the required numbers.
Regards JC....