I can't get my code to compile.
- Created Monday, September 22nd 2014 @ 19:59:11
Hi, has anyone gotten their code to compile recently? I've tried to upload a very simple "hello world" program in C++:
int main(int argc, const char * argv[]) { cout << "Hello, World!\n"; return 0; }
and I get the following error dump:
src/MACOSX/._main.cpp:1:1: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\5’ in program src/MACOSX/._main.cpp:1:2: error: stray ‘\26’ in program src/MACOSX/._main.cpp:1:2: error: stray ‘\7’ in program src/MACOSX/._main.cpp:1:5: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\2’ in program src/MACOSX/._main.cpp:1:7: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:17: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\2’ in program src/MACOSX/._main.cpp:1:27: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:35: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:39: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\2’ in program src/MACOSX/._main.cpp:1:43: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\253’ in program src/MACOSX/._main.cpp:1:47: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:89: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\253’ in program src/MACOSX/._main.cpp:1:97: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\234’ in program src/MACOSX/._main.cpp:1:101: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\17’ in program src/MACOSX/._main.cpp:1:105: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\1’ in program src/MACOSX/._main.cpp:1:121: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\234’ in program src/MACOSX/._main.cpp:1:125: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\17’ in program src/MACOSX/._main.cpp:1:129: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:2: error: stray ‘\27’ in program src/MACOSX/._main.cpp:1:154: warning: null character(s) ignored [enabled by default] src/MACOSX/._main.cpp:1:9: error: ‘Mac’ does not name a type src/__MACOSX/._main.cpp:1:163: error: expected unqualified-id before numeric constant
I'm developing on a Mac, but g++ compiles fine on my machine.
- Created Monday, September 22nd 2014 @ 21:35:49
I'm not an expert on C++, but you might want to check out the C++ starterbot on the getting started page and compare it to your own.
- Created Monday, September 22nd 2014 @ 23:38:02
It looks like whatever file you uploaded was unpacked into gibberish.
- Created Monday, September 22nd 2014 @ 23:48:39
Ok, I found the problem. It seems like Apple's native archiving tool adds Finder metadata to zip files and it removes during the unarchiving process so users never actually sees it. I had to download a third party archiving program to zip my source code. It works fine now.
Expl0itUpdated Monday, February 12th 2018 @ 23:08:2310000000146