User forums > General (but related to Code::Blocks)
Console NOK from command prompt but OK from CB activation
(1/1)
jmClifford:
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;
--- Quote ---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
--- End quote ---
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....
jmClifford:
Hi. I found issue. I should have known better.
--- Quote ---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
09-May-24 02:47 PM <DIR> .
09-May-24 02:47 PM <DIR> ..
09-May-24 11:50 AM 74,745 Console.exe
09-May-24 11:01 AM 59,052 CreateUse.dll
09-May-24 02:47 PM <DIR> junk
09-May-24 11:04 AM <DIR> junk2
09-May-24 11:01 AM 2,384 libCreateUse.a
17-Oct-23 02:04 PM 112,640 libgcc_s_seh-1.dll
17-Oct-23 02:04 PM 2,282,496 libstdc++-6.dll
17-Oct-23 02:04 PM 54,784 libwinpthread-1.dll
6 File(s) 2,586,101 bytes
4 Dir(s) 148,848,451,584 bytes free
--- End quote ---
I was missing the last 3 dll's above. These are from the MinGW compiler section.
These I presume are what I need for standalone console operation while another 2 files (dll's) are required for wx_Widgets (Release and Debug versions of the same).
Regards JC......
Navigation
[0] Message Index
Go to full version