Problems with visual studio code & running projects

just a question regarding visual studio code - not sure if anyone else has run into this problem, but wanted to ask. im on macOS Mojave if that helps.

everything builds & seems fine. but when i run the application with make runDebug it errors out with an error of 134.

but then when I try a cmd-r to run it. it errors out in a different way with console instead

its really the same message but how its presented is different

was just wondering if anyone has run into this or if there is any fix. id like to use VSCode instead as I love the layout & what I can do with it & it isn’t a huge application :wink:

thanks

tried a clean install. but nope. still the same problem. im just struck as to what to do.
on slack, said it was linking to a dynamic library, but even @roymacdonald who was helping did have their working right away. but im just not getting it

just posted on the original vscode thread. so hopefully someone may help

Hey, I double checked and it works for me. straight out of the box. The following are the steps I’ve taken:

  • update/generate the project with project generator, making sure I choose “Visual Studio Code” from the Templates dropdown menu, (I’ve just left xcode chosen on platform, not sure if this affects or not).
  • Open Visual Studio Code and from the File menu select open workspace and choose the .code-workspace file of the recently updated/generated project.
  • From the terminal menu select Run Build Task... and from the dropdown choose either the debug or release. I’ve chosen debug so far.
  • Once built successfully (it will show in the bottom console) go to Debug menu and select “Start Debugging”, some stuff will print to the console and the app will open.

Using Visual Studio Code version: 1.41.1, macos Mojave 10.14.6, OF current master branch.

Hope this helps.

1 Like

aye. its the exact way I try it as well. but nope. still the same outcome. I even have shortcuts on my keyboard, but those don’t work either, same result.

I really am stuck as to what it could be & im also on the same setup as yourself :thinking:

As well I have the C++ extension installed for VS Code ms-vscode.cpptools

I just read your errors and it is not linking to the AudioToolbox framework, which is something that probably is on your specific project. Did you try building just a regular example?

If the problem actually is linking to the dylib the probably you need to add that manually.
it would be nice to have that done automatically by project generator, although I think that right now it simply copies some config files instead of generating these.

If such is the case you can add the framework to the config.make file. I am not sure that this would solve the problem although it makes sense.
Uncomment the line that reads

PROJECT_LDFLAGS=-Wl,-rpath=./libs

Add the following line

PROJECT_LDFLAGS+= -framework AudioToolbox
1 Like

aye. I made sure to get the cpp tools from Microsoft. I did take off an IntelliSense extension, just incase that was having trouble.
also been trying with a blank project this whole time, only drawing a box on screen. but same messages. very odd.

here is my project. also has the changed config.make. I also noticed this when running make RunDebug from the terminal.

vscodetest.zip (4.0 KB)

this project is just clean though. nothing in it, so its weird about the linking or even the audio stuff

thanks for your help by the way @roymacdonald xxx

this is with a clean extension install. but other than that, not done anything apart from following the pointers & how to do the setup

With what you sent it was not possible to build, it was missing the Makefile file. after adding it it built with no problems.
Are you able to build using make on the terminal?

oddly it says something about make

but al im doing is creating, building then trying to run. the build seems all fine. but running bugs out with those messages from before. ill have another try with a new project & sure other file are in

the output from using make RunDebug in the terminal

I also have the makefile. ive also just zipped the project. just took out the hidden viscose folder & build folder

newsketchvscode.zip (140.1 KB)

just wondering if it build & runs on your end. its still weird. :thinking:

you would need to put it in the projectGenerator to get the vscode stuff put back in

i had to run what you sent through project generator again, otherwise it will throw some errors related to absolute routes on your computer. After updating compiling and running worked with no problems.

What I meant about using make was to try and compile outside of vs code. Just open a terminal window, cd into the project’s folder, type make and hit enter. Does this work?

my apologies [its been a weirdly long day], but make seems to be working. its building a release version & just finished with the make RunRelease in the terminal. just gonna have a try…

same problem using make RunRelease

well then, certainly you have a problem with make and not with vscode.

here seems to be the fix for it

aye seems like a wide problem. thanks, ill give a check to the link given in the morning :wink:

yeah. seems like an xcode crap.

I think im going to do a clean OS install. ive been meaning to do it for ages but just needed the time. I have a copy of Mojave & the flash drives to do all the other cack.
plus as well it will clean up things. though do have a copy of the last Xcode before it crapped out, so could try that first :wink:

ill let you know if I get it done & it fixes things. though if anyone else know & could help, by all means :wink:

you have been wonderful in helping by the way @roymacdonald xxx

No problem. You’ve been so helpful with your video tutorials, it is the least I could do.

Yeah, maybe a clean OS install can be a good idea. Its kinda cumbersome to do but it can solve a lot of things.

You can find all the previous xcode versions here

cheers

1 Like

all done.
jesus… really that was such a slog, as my thumb drive with Mojave was corrupt & I had just wiped my computer, so then had to use a windows machine to then create the tumblebug drive.
but its done & its working. :wink:

phew…