Why doesn’t g++ compile the code that visual studio compiles?

Asked

Viewed 265 times

0

already makes some projects that I test and my g++ does not compile at all my projects of visual studio, errors that appear in g++ do not exist in visual studio... anyone knows why? and how do you think you can solve this?

output of G++

Loader w Version Checker.cpp:35:2: error: 'b' does not name a type
}   w h i l e   ( P r o c e s s 3 2 N e x t ( S n a p S h o t ,   & p r o c E n t r y ) ) ;

^

While in visual studio...

Tela do visual studio

  • I can’t answer for sure because I’ve never used visual studio, but it could be something related to the linkage of bilbiotecas. Maybe visual studio will automatically do this for you with some library you’re using, while for g++ you’d have to do it explicitly.

  • may be too but my solution also worked so I don’t know

1 answer

-1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.