Oliver Cruickshank
6 posts
Goto error not working
I recently picked up 4coder and I have been testing out features, which so far I think are great.

However, one issue i am having is with goto error. I build my project with cmake and then use a bat file to compile with devenv. Pressing alt + m will open the special build panel which will display my errors but when i move the cursor over them and press enter nothing happens. I may be missing something but any help is greatly appreciated!

26 posts
Goto error not working
Can you attach an example of the error format you get? for example I know that 4coder need the full path to a file.
There is another bug (I don't think it's your case though) that forces you to wait until the compiliation finishes before going to an error.
Oliver Cruickshank
6 posts
Goto error not working
1>C:\Users\Oliver\Documents\Programming\CPP\3d_tetris\src\main.cpp(21): error C3688: invalid literal suffix 're4terg'; literal operator or literal operator template 'operator ""re4terg' not found
1>C:\Users\Oliver\Documents\Programming\CPP\3d_tetris\src\main.cpp(22): error C2143: syntax error: missing ';' before '}'

this is the format I get, which seems to look plausible for 4coder to jump to
Simon Anciaux
1184 posts
Goto error not working
The problem is the "1>" in front of the file name. 4coder keeps it in the file name: it uses the first non white space character of the line as the start of the filename. You can send an e-mail to Allen with the output example so he can fix it.
In the mean time, if you have access to the "super" version of 4coder you can try to fix it (in 4coder_jumping.h, the parse_jump_location function).
Oliver Cruickshank
6 posts
Goto error not working
I'll have a go now, thanks! Although, I am having a few problems with compiling files with buildsuper.bat. The default file "4coder_default_bindings.cpp" is never found by the batch file. The error is as followed:

[vcvarsall.bat] Environment initialized for: 'x64'
c1xx: fatal error C1083: Cannot open source file: '4coder_default_bindings.cpp': No such file or directory
Could Not Find C:\Users\Oliver\source\*.exp
Could Not Find C:\Users\Oliver\source\*.lib

Simon Anciaux
1184 posts
Goto error not working
Is the file 4coder_default_bindings.cpp present in the 4coder directory (the one containing buildsuper.bat) ?
Do you have the file opened in another program that may limit the access to it ?
Do you launch the batch file from the 4coder directory (it should not matter but it's worth trying) ?
You can set which file is compiled by passing a file name as the first argument to buildsuper.bat. So maybe try this in a console:
buildsuper.bat 4coder_default_bindings.cpp
Oliver Cruickshank
6 posts
Goto error not working
Edited by Oliver Cruickshank on
Yes it's in the same directory, just as I downloaded it. I tried with only powershell open with no avail. And yes I run it straight from the directory and also parsed in the file I wanted to compile with the same issue.

This is what dir shows:

Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 24/12/2017 23:51 4coder_API
d----- 24/12/2017 23:51 4coder_generated
d----- 24/12/2017 23:51 4coder_helper
d----- 24/12/2017 23:51 4coder_lib
d----- 27/12/2017 00:53 fonts
d----- 24/12/2017 23:51 languages
d----- 24/12/2017 23:51 themes
d----- 24/12/2017 23:51 windows_scripts
-a---- 24/12/2017 23:51 28089 4coder_auto_indent.cpp
-a---- 24/12/2017 23:51 40379 4coder_base_commands.cpp
-a---- 24/12/2017 23:51 8702 4coder_build_commands.cpp
-a---- 24/12/2017 23:51 5079 4coder_clipboard.cpp
-a---- 24/12/2017 23:51 946 4coder_default_bindings.cpp
-a---- 24/12/2017 23:51 45359 4coder_default_framework.h
-a---- 24/12/2017 23:51 17172 4coder_default_hooks.cpp
-a---- 24/12/2017 23:51 28366 4coder_default_include.cpp
-a---- 24/12/2017 23:51 14064 4coder_function_list.cpp
-a---- 24/12/2017 23:51 13513 4coder_jumping.h
-a---- 24/12/2017 23:51 5276 4coder_jump_direct.cpp
-a---- 24/12/2017 23:51 23707 4coder_jump_sticky.cpp
-a---- 24/12/2017 23:51 35243 4coder_metadata_generator.cpp
-a---- 24/12/2017 23:51 1171 4coder_os_comp_cracking.h
-a---- 24/12/2017 23:51 32235 4coder_project_commands.cpp
-a---- 24/12/2017 23:51 2044 4coder_remapping_commands.cpp
-a---- 24/12/2017 23:51 29521 4coder_scope_commands.cpp
-a---- 24/12/2017 23:51 35870 4coder_search.cpp
-a---- 24/12/2017 23:51 1201 4coder_search.h
-a---- 24/12/2017 23:51 1792 4coder_system_command.cpp
-a---- 24/12/2017 23:51 472064 4ed.exe
-a---- 24/12/2017 23:51 349696 4ed_app.dll
-a---- 24/12/2017 23:51 1010 buildsuper.bat
-a---- 25/12/2017 00:57 1339 config.4coder
-a---- 24/12/2017 23:51 391680 custom_4coder.dll
-a---- 24/12/2017 23:51 1294 LICENSE.txt
-a---- 24/12/2017 23:51 315 README.txt
Simon Anciaux
1184 posts
Goto error not working
Can you open the "4coder_default_bindings.cpp" file in notepad or another editor ? It sound like something is locking the file, maybe your antivirus or something ?

You could try to compile using this command to see if the problem comes from the batch file (assuming 4coder files are in C:\Users\Olivier\source\ and the metagenerator was run):
cl /I"C:\Users\Oliver\source\ " /W4 /wd4310 /wd4100 /wd4201 /wd4505 /wd4996 /wd4127 /wd4510 /wd4512 /wd4610 /wd4457 /WX /GR- /nologo /FC /Zi 4coder_default_bindings.cpp /Fecustom_4coder /LD /link /INCREMENTAL:NO /OPT:REF /EXPORT:get_bindings /EXPORT:get_alpha_4coder_version
Allen Webster
474 posts / 4 projects
Goto error not working
Thanks to everyone helping out on this. I can get the "#>" added to the jump parser in the next build probably.

As for the buildsuper problem, I am a bit stumped, mrmixer's is doing a better job troubleshooting this than I would have done it looks like, so just keep listening to him! If you find a problem with the script let me know and I'll fix it. If the dir you ran was not in the script try that, I think it may do some "cd" or "pushd" stuff that might be moving you to the wrong place or something, but other than that I have no ideas.
19 posts
Goto error not working
I can not get the goto error to work either.

I have set everything up according to the stream. W: drive and such.

4Coder runs and compiles everything fine except when there is an error.

I am using 4Coder 4.0.25 super user with Visual Studio 2013.

like on day 2/3

#include <windows.h>

WinMain(HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpCmdLine,
        int nCmdShow)
    MessageBoxA(0, "This is Handmade Hero.", "Handmade Hero",

yes I know there is a ; missing. It is a test. It reports this back:

Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

..\Code\win32_handmade.cpp(20) : error C2143: syntax error : missing ';' before return'
exited with code 0

It reports the error ok but I can not get it to jump to the error in code.
I thought it was ctrl/alt n? or by mouse click on the 20 and enter? Either way nothing happens.

I'm sure Am I misunderstanding something simple here.

26 posts
Goto error not working
Your problem probably is that you don't have full path on errors, try adding -FC to the compiler command line, e.g.
cl.exe -FC win32_handmade.cpp
19 posts
Goto error not working
Edited by Zenn on
Yes that was it TY!