Boost Eclipse vs CLI compilation strangeness [message #1220691] |
Fri, 13 December 2013 05:58 |
Simon Bazley Messages: 1 Registered: December 2013 |
Junior Member |
|
|
I'm trying to get back into coding C++ after a 12 year break, and thought I'd start with eclipse/cdt as my IDE.
Now I want to write something with JSON so found the attached example at https gist.github.com/mloskot/1509935 which is an example of using one of the libboost libraries for the purpose.
Now I create the file and compile it with g++ <file> and all works happily with no errors or warnings, But when I create an eclipse project with that one file in, I get lots of strange semantic errors and it fails to compile. Most notably:-
Description Resource Path Location Type
./src/main.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC SQL Meta C/C++ Problem
Description Resource Path Location Type
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
' main.cpp /SQL Meta/src line 20 Semantic Error
Checking out the outputs with -v they look pretty similar, The problems are coming up before link time, so I guess it's not missing libraries (although if it was, why is g++ picking them up from the path, and eclipse not, even though the path data is the same).
I'm thoroughly confused. Am I missing something fundamental, or does the eclipse problem checker, just not handle this kind of thing?
-
Attachment: main.cpp
(Size: 0.80KB, Downloaded 260 times)
|
|
|
Powered by
FUDForum. Page generated in 0.02540 seconds