Tyler
4 posts
Roguelike enthusiast, gamedev wannabe. c, c++ and python programmer currently.
How to build/compile inside 4coder?
Edited by Tyler on
Sorry i feel like this is a stupid question, but i cant get my project to build in 4coder no matter how i go about it.
watching Allen's tutorial videos i copied everything i could and never got it to work, maybe i made a dumb mistake im not seeing i'm not really sure.

i can compile from command line just fine and can compile inside visual studios just fine. i think i have my paths set up right also.

i keep getting the error
"Ending file: *compilation*
ERROR: Failed to make the cli call"

it doesn't seem to make any difference if i have a batch file it runs set up to run vcvarsall or if i open 4coder in a terminal that already ran that, i get this error no matter what.

anyways, i love 4coder and having to use other editors in the mean time sucks so i hope someone can help me out here :)

https://imgur.com/a/0F1IJ8h (My main.cpp and project.4coder files)

i haven't wrote c in around 3 years also, so apologies if i just made a super dumb mistake.

(if you need any more info i'll be happy to provide it.)
Simon Anciaux
1126 posts
How to build/compile inside 4coder?
You have a "*" in load_path_win but there shouldn't be one.
 1 2 3 load_path_win = { { "." } }; 

But I'm not sure that's the issue. The problem might be that you're not executing from the right path. Try to use an absolute path in you build command (e.g. W:\project\build.bat ) to see if it's a path related issue.
Tyler
4 posts
Roguelike enthusiast, gamedev wannabe. c, c++ and python programmer currently.
How to build/compile inside 4coder?
Edited by Tyler on
I appreciate the help mrmixer!

Thanks for the heads up with the *, but yeah it wasn't the issue.

I tried doing the absolute path and that also didn't work.
I feel like 4coder isn't even reading/running my bat file.

edit: What should my bat for this look like? everything i found online I've tried and of course they work just fine when i run them outside of 4coder, but nothing works from inside it.

I feel like Allen or someone should make a better more updated tutorial on how to get going in 4coder, i can't be the only idiot that can't figure it out!
Simon Anciaux
1126 posts
How to build/compile inside 4coder?
build.bat can contain whatever you want. For a simple test you could just have:
 1 2 @echo off echo Hello Dave. 

Which would just print "Hello Dave." when you call it.

Does the *messages* buffer contain errors when you load the project file ? Does it open the source files ?

Could you post a zip of the folder so I could try it on my machine (or post all the files here) ?
John
46 posts
How to build/compile inside 4coder?
It could also be a permission issue. If you have set cmd to always run as admin while 4coder runs normally, I believe it wouldn't be able to call cmd, due to having a lower privilege.
Tyler
4 posts
Roguelike enthusiast, gamedev wannabe. c, c++ and python programmer currently.
How to build/compile inside 4coder?
Sorry for the late reply.

hope dropbox is ok, if not i can send it in another way if you would prefer. https://www.dropbox.com/s/bwm45mubazn49yu/tests.7z?dl=0

It could also be a permission issue. If you have set cmd to always run as admin while 4coder runs normally, I believe it wouldn't be able to call cmd, due to having a lower privilege.

cmd isnt set to always be admin on my machine. (also i have it set up so cmder is my console. (and cmder doesnt run admin by default)
Simon Anciaux
1126 posts
How to build/compile inside 4coder?
It's working on my machine (build.bat is executed, but vcvarsall.bat is not in the path for me so the script contains errors). So I don't know what the problem is for you.

Is your project in a path that contains spaces or special characters ( parenthesis, diacritics... ) ? Could you try in a simple path like "C:\tests" if it's not the case ?

Otherwise your best bet would be to contact Allen by e-mail (the address is in the *messages* buffer) or twitter.
Tyler
4 posts
Roguelike enthusiast, gamedev wannabe. c, c++ and python programmer currently.
How to build/compile inside 4coder?
Edited by Tyler on
The original path i had it in had a space, but i changed that a couple days ago to one with no spaces.
just now i tried it inside a folder in the 4coder folder, which i keep right in D:\ and im still getting "failed to make the cli call"

I appreciate your help and I've emailed Allen.
Allen Webster
473 posts / 4 projects
Heyo
How to build/compile inside 4coder?
Edited by Allen Webster on
It's hard to say what's going wrong here. As with MrMixer, your test case works just fine for on my machine. The error you are seeing can occur for a number of reasons, but the most likely in my opinion is that something unusual is happening when 4coder tries to launch a child process. One of the string manipulations to get the path and full command line might be running out of memory, they're both given a fixed 2 kilabytes, so it would be surprising but possible. Perhaps there's an unusual configuration that is preventing cmd.exe from being found/running? I don't really know, and I have changed so much of this at this point that there's a good chance that the same bug no longer exists in my current build. For instance, the error you are getting "ERROR: failed to ..." doesn't even exist in the codebase anymore.

I wish I could be more help, but I'm really not sure what's going on here :/