Recent Posts

Pages: 1 ... 4 5 6 7 8 [9] 10
81
Yes. It's not there (it disappears when I close the terminal window, as expected).

I also downloaded process explorer and tried to search for processes under that name, or any other meaningful name I could think of, cannot find anything .. I also searched on how to list all running processes via powershell and sort them by datetime for example (show most recent on top so i don't get lost), again I can see the process (name, pid, everything) when the terminal window is open, but when i close it there seems to be no process kept running that could somehow explain 'locking' test3.exe ...

82
Did you verify in the Windows task manger that test3.exe is not still running?

Tim S.
83
Thanks for your help. I am trying to provide what you requested.

I checked compiler -> settings -> other settings, compiler logging was already in 'full command line'.

I create a new file, test3.c. It contains a simple printout.

I compile the .c file first (simple compile, not build and run). In codeblocks build log i get:


Code
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

gcc.exe   -c C:\Users\thomas\test3.c -o C:\Users\thomas\test3.o
gcc.exe  -o C:\Users\thomas\test3.exe C:\Users\thomas\test3.o   
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))


Then I do build & run. Program executes succcessfully, a terminal window opens and I see the results of the printf.

Build log in codeblocks shows:


Code
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

gcc.exe   -c C:\Users\thomas\test3.c -o C:\Users\thomas\test3.o
gcc.exe  -o C:\Users\thomas\test3.exe C:\Users\thomas\test3.o   
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
Checking for existence: C:\Users\thomas\test3.exe
Executing: '"C:\CodeBlocks/cb_console_runner.exe" "C:\Users\thomas\test3.exe"' (in 'C:\Users\thomas')
Set variable: PATH=C:\CodeBlocks\MinGW\bin;C:\CodeBlocks\MinGW;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PuTTY;C:\Program Files (x86)\Calibre2;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\MinGW64\bin;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\Program Files (x86)\dotnet;C:\Program Files\GitHub CLI;C:\Program Files\Git\cmd;C:\Users\thomas\AppData\Local\Programs\Python\Python311\Scripts;C:\Users\thomas\AppData\Local\Programs\Python\Python311;C:\Users\thomas\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java\jdk1.8.0_191\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.2\bin;\;C:\Users\thomas\AppData\Local\Android\Sdk\platform-tools;C:\Users\thomas\AppData\Roaming\npm;C:\Program Files (x86)\Nmap;c:\Users\thomas\aliases

This is the terminal window:

Code
1111
Process returned 0 (0x0)   execution time : 1.822 s
Press any key to continue.

 (the only code inside the test3.c file is a
Code
printf("1111");


I close terminal window.

If I do another Build&Run (without changing anything in the code), I get the error. Build log shows:


Code
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

gcc.exe   -c C:\Users\thomas\test3.c -o C:\Users\thomas\test3.o
gcc.exe  -o C:\Users\thomas\test3.exe C:\Users\thomas\test3.o   
C:/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\Users\thomas\test3.exe: Invalid argument
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))



Could it be that PATH shows two different entries for MINGW compiler, one ending at the /bin directory and one in the parent directory, or is that completely irrelevant?


84
Using Code::Blocks / Find functions called by or calling
« Last post by Evan on March 14, 2024, 10:38:34 am »
Find functions calling never shows the 'Find functions called by' or 'Find function calling'  results.

If connected in any way, search and replace works very well.

Thanks in advance
85
Using Code::Blocks / Howto use Hexdit search
« Last post by Evan on March 14, 2024, 10:31:29 am »
I use Hexedit very often, but I have not yet figured out how to use the search feature to find anything?

Thanks in advance.
86
Using Code::Blocks / Debugger - Memory dump
« Last post by Evan on March 14, 2024, 10:29:31 am »
Happy Code::Blocks user here running Linux Mint LMDE programming in C99:

When I use Memory dump, I have to type the memory address I want look at in the Memory dump window.

How can I copy/paste the memory address, from the Watch window to the Memory dump window?

Thanks in advance.

87
Have you tried pressing a key to close the console?

The "No project/No target/Unknown compiler" message has no sense, and
Code
ld.exe||cannot open output file C:\tmp\test.exe Invalid argument|
means something is corrupted.

Go to Settings->Compiler->Other settings and select "Full command line" in Compiler logging. Then do a full rebuild and post the result here in code tags (the # above the edit window).
88
Have you checked if your program finishes? Open task manager and check if console runner or your program are still alive.

Hello, and thanks for your input.

Yes, it does finish. When I run it the first time, I do see cb_console_runner.exe in tasks, when i close the window (click x on console window showing output), it disappears from task manager. I have also checked through PowerShell, sorting all processes by time - again same behaviour, I see the processes and I stop seeing them when I close the window. The program seems to finish, like it always did when I simply closed the terminal window that opens up. Also, codeblocks compile/run/compile&run buttons are disabled when terminal window is still open.

However, upon closing window, codeblocks re-enables buttons, and although I don't see the process anymore in Windows, compile&run shows the error I pointed out in my first post. I have to go and manually delete .exe file in order to be able to compile&run again.
89
Plugins development / Re: Code completion using LSP and clangd
« Last post by garwin on March 14, 2024, 07:42:09 am »
@garwin

Remove the space(s) in"....mingw 13.1/....

Thanks a lot, that's it and adding everything to the search directory. I usually do not use spaces but for whatever unknown reasons I did it for the compiler version.
90
General (but related to Code::Blocks) / Re: CB C++ Issue with GNU C++ 17 (ISO)
« Last post by jmClifford on March 14, 2024, 12:31:15 am »
Hi. Thanks for the help.
I have MinGW 13.2 working (after 2 X 1 hour builds; release and debug).
The "To_Do" program operates even without nominating GNU C++ 17.
I can access the items in the <filesystem> now, which I was failing on before.  This is mainly file/folder exits().

I will consider the -jx option (wrt threads) next time.  Or maybe sooner, since I am interested in this for myself (my programming).

Regards JC......
Pages: 1 ... 4 5 6 7 8 [9] 10