#πŸ”’ Set up

26 messages Β· Page 1 of 1 (latest)

deep patrol
#

I'm trying to familiarize myself with C++ so I can learn ROS as a stepping stone but I can't figure out the setup, I configured the path on my PC to GCC and installed it but after writing a very basic script and trying to run it I encounter errors, no clue as to why.
I suppose my main issue is that I'm only used to Python workflow and debugging. Any ideas how to fix this compiling error?:

undefined reference to `std::cout'

onyx hearth
#

Oh, you're missing an "#include <iostream>" i think

#

You're trying to call a function you didn't import into the code

deep patrol
#

I wrote #include

#

Does that function?

onyx hearth
#

Sorry yeah include

#

You might be missing a ; somewhere then

deep patrol
#

I'm following a tutorial, he didn't get the error which leads me to believe its the setup that was done wrongly

onyx hearth
#

Is that the only error you're getting?

deep patrol
#

This is the code

#

#include <iostream>

int main(){
std::cout << "I like dogs!";
return 0;
}

#

Yes

onyx hearth
#

That looks okay, idk, it might be an issue with g++ or something yeah

#

Sorry idk

deep patrol
#

No worries πŸ™‚

serene geyser
deep patrol
#

Figured it out, used gcc instead of g++

hardy condorBOT
#

@deep patrol has reached level 1. GG!

deep patrol
#

Solved all my problems

#

cheers

#

!clise

#

!close

#

!end

rancid ginkgo
#

There is a slash (/) command to close posts (/close) its optional to use it

deep patrol
#

Thanks

wanton badgerBOT
#

πŸ”’ Set up