4coder » Forums » Random Link/Build Errors When Building In-Editor
Delix
Ryan Fleury
78 posts
1 project

Student and developer of The Melodist

#14963 Random Link/Build Errors When Building In-Editor
1 week, 1 day ago Edited by Ryan Fleury on April 15, 2018, 4:28 p.m.

Hey there- I'm not sure if my problem is a result of my own incompetence or not...

I'm building on Windows using MSVC. When I build in-editor I get random linking errors that sometimes prevents a build from completing successfully. An example is:

1
LINK : fatal error LNK1104: cannot open file 'win32_main.obj'


I'm just using a HMH-style batch file, located in the source code's parent directory, to build, which can be found here. The same linking errors don't appear to happen when I build from the terminal. It should be said that the builds in-editor sometimes work, and restarting 4coder usually fixes it.

Apologies in advance if this is an oversight on my part; I think it might be because I don't know how to properly write batch files... Thanks for the help!

Developer of The Melodist
Mr4thDimention
Allen Webster
343 posts
2 projects

Heyo

#14964 Random Link/Build Errors When Building In-Editor
1 week, 1 day ago

It may be that there is actually a bug in the script *technically* but the terminal fixes it by forcing things to happen in more strict orders or something... not sure. Are you running this batch script from a fixed command set in a project file, or with <alt M> ?
Delix
Ryan Fleury
78 posts
1 project

Student and developer of The Melodist

#14965 Random Link/Build Errors When Building In-Editor
1 week, 1 day ago

Hmm, interesting... I'm just using Alt+M currently.

Developer of The Melodist
Mr4thDimention
Allen Webster
343 posts
2 projects

Heyo

#14968 Random Link/Build Errors When Building In-Editor
6 days, 23 hours ago

Ahh okay. In that case, the other thing to keep in mind is what the current directory is for the script. I can't remember the rules of <alt m> but it may be that which file you have actives effecting that. Setting up a project lets you fix the root directory so that it's no longer searching for and deducing the build script based on the active file.
Delix
Ryan Fleury
78 posts
1 project

Student and developer of The Melodist

#14970 Random Link/Build Errors When Building In-Editor
6 days, 22 hours ago

Hm, okay- I'll try that out. I'm not sure if that is what was causing the errors, though, as at the time, all of the code was in the same directory. What's interesting is that it is a seemingly rare phenomenon now...

Developer of The Melodist
Mr4thDimention
Allen Webster
343 posts
2 projects

Heyo

#14981 Random Link/Build Errors When Building In-Editor
5 days, 15 hours ago Edited by Allen Webster on April 18, 2018, 4:03 a.m.

Hmmm... interesting. It could also be that with <alt m> you're launching the same process multiple times and somehow one of them never gets freed until 4coder closes... ? That could explain why the specific error you hit involves failure to open an intermediate file.

You could try spamming <alt m> quickly and seeing if that increases the chances of creating the problem?

Also, 4coder internally supports a few different ways of handling the situation when multiple child processes appear to be in conflict, including launching the new one, and showing it in place of the old, and refusing to launch a new one while a parallel instance appears to be running. It might be that the "build search" <alt m> and "project command" <alt Fkey> don't use the same behavior... I can't remember right now.

EDIT: Just had a look at the code, it looks like they both do the overlap with conflict option, so scratch out that theory.
Delix
Ryan Fleury
78 posts
1 project

Student and developer of The Melodist

#15017 Random Link/Build Errors When Building In-Editor
3 days, 2 hours ago

Hmm, yeah, it doesn't seem like spamming it really changes the likelihood. It's relatively rare, so it's not a major issue; I still need to find some time to try out a project file instead though (there are some features in project files that seem valuable to use anyways)...

Developer of The Melodist